OxL Справочник OxL
РусскийEnglish

warning deprecated

warning Стандарт: [§4.9]

Использование устаревшего элемента.

What it means#

The item is marked @deprecated(msg) (§4.9, part II.3) and the code still uses it. The message explains the replacement. This is a warning, configurable in [lint].

Example#

oxl✓ проверяется в CI
@deprecated("use newApi")
fn oldApi() -> i32 => 1

fn main() {
  print("{oldApi()}")      // <- deprecated
}
error
deprecated

How to fix#

oxl✓ проверяется в CI
fn newApi() -> i32 => 1

fn main() {
  print("{newApi()}")
}

Switch to the replacement named in the message before the item is removed.

See also#

OxL 1.0.0-beta · Версия документации 1.0.0-beta© OxwaldLink · сгенерировано из Стандарта, исходников std и руководства