diff options
| author | Ralf Jung <post@ralfj.de> | 2024-04-17 12:30:45 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2024-04-17 13:00:43 +0200 |
| commit | 8b35be741fd1e46f81a3614478279d718701783e (patch) | |
| tree | c44aee9429632567c7e3a74646d67145339aa635 /tests/ui/lang-items | |
| parent | d101971ab10ebc95ad0664b704b730ce792d8fc5 (diff) | |
| download | rust-8b35be741fd1e46f81a3614478279d718701783e.tar.gz rust-8b35be741fd1e46f81a3614478279d718701783e.zip | |
consistency rename: language item -> lang item
Diffstat (limited to 'tests/ui/lang-items')
| -rw-r--r-- | tests/ui/lang-items/issue-83471.rs | 6 | ||||
| -rw-r--r-- | tests/ui/lang-items/issue-83471.stderr | 6 | ||||
| -rw-r--r-- | tests/ui/lang-items/issue-87573.rs | 4 | ||||
| -rw-r--r-- | tests/ui/lang-items/issue-87573.stderr | 4 | ||||
| -rw-r--r-- | tests/ui/lang-items/lang-item-generic-requirements.rs | 12 | ||||
| -rw-r--r-- | tests/ui/lang-items/lang-item-generic-requirements.stderr | 12 | ||||
| -rw-r--r-- | tests/ui/lang-items/start_lang_item_with_target_feature.rs | 2 | ||||
| -rw-r--r-- | tests/ui/lang-items/start_lang_item_with_target_feature.stderr | 4 |
8 files changed, 25 insertions, 25 deletions
diff --git a/tests/ui/lang-items/issue-83471.rs b/tests/ui/lang-items/issue-83471.rs index b32aa034151..6be345ac507 100644 --- a/tests/ui/lang-items/issue-83471.rs +++ b/tests/ui/lang-items/issue-83471.rs @@ -5,12 +5,12 @@ #![no_core] #[lang = "sized"] -//~^ ERROR: language items are subject to change [E0658] +//~^ ERROR: lang items are subject to change [E0658] trait Sized {} #[lang = "fn"] -//~^ ERROR: language items are subject to change [E0658] -//~| ERROR: `fn` language item must be applied to a trait with 1 generic argument +//~^ ERROR: lang items are subject to change [E0658] +//~| ERROR: `fn` lang item must be applied to a trait with 1 generic argument trait Fn { fn call(export_name); //~^ ERROR: expected type diff --git a/tests/ui/lang-items/issue-83471.stderr b/tests/ui/lang-items/issue-83471.stderr index 1f22d966dd7..244b2efeaf1 100644 --- a/tests/ui/lang-items/issue-83471.stderr +++ b/tests/ui/lang-items/issue-83471.stderr @@ -4,7 +4,7 @@ error[E0573]: expected type, found built-in attribute `export_name` LL | fn call(export_name); | ^^^^^^^^^^^ not a type -error[E0658]: language items are subject to change +error[E0658]: lang items are subject to change --> $DIR/issue-83471.rs:7:1 | LL | #[lang = "sized"] @@ -13,7 +13,7 @@ LL | #[lang = "sized"] = help: add `#![feature(lang_items)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date -error[E0658]: language items are subject to change +error[E0658]: lang items are subject to change --> $DIR/issue-83471.rs:11:1 | LL | #[lang = "fn"] @@ -32,7 +32,7 @@ LL | fn call(export_name); = note: for more information, see issue #41686 <https://github.com/rust-lang/rust/issues/41686> = note: `#[warn(anonymous_parameters)]` on by default -error[E0718]: `fn` language item must be applied to a trait with 1 generic argument +error[E0718]: `fn` lang item must be applied to a trait with 1 generic argument --> $DIR/issue-83471.rs:11:1 | LL | #[lang = "fn"] diff --git a/tests/ui/lang-items/issue-87573.rs b/tests/ui/lang-items/issue-87573.rs index aeb0c245a72..7b805e8b0cd 100644 --- a/tests/ui/lang-items/issue-87573.rs +++ b/tests/ui/lang-items/issue-87573.rs @@ -18,11 +18,11 @@ trait Sync {} impl Sync for bool {} #[lang = "drop_in_place"] -//~^ ERROR: `drop_in_place` language item must be applied to a function with at least 1 generic argument +//~^ ERROR: `drop_in_place` lang item must be applied to a function with at least 1 generic argument fn drop_fn() { while false {} } #[lang = "start"] -//~^ ERROR: `start` language item must be applied to a function with 1 generic argument +//~^ ERROR: `start` lang item must be applied to a function with 1 generic argument fn start(){} diff --git a/tests/ui/lang-items/issue-87573.stderr b/tests/ui/lang-items/issue-87573.stderr index 25560cfa0e6..7085bb8c339 100644 --- a/tests/ui/lang-items/issue-87573.stderr +++ b/tests/ui/lang-items/issue-87573.stderr @@ -1,4 +1,4 @@ -error[E0718]: `drop_in_place` language item must be applied to a function with at least 1 generic argument +error[E0718]: `drop_in_place` lang item must be applied to a function with at least 1 generic argument --> $DIR/issue-87573.rs:20:1 | LL | #[lang = "drop_in_place"] @@ -7,7 +7,7 @@ LL | LL | fn drop_fn() { | - this function has 0 generic arguments -error[E0718]: `start` language item must be applied to a function with 1 generic argument +error[E0718]: `start` lang item must be applied to a function with 1 generic argument --> $DIR/issue-87573.rs:26:1 | LL | #[lang = "start"] diff --git a/tests/ui/lang-items/lang-item-generic-requirements.rs b/tests/ui/lang-items/lang-item-generic-requirements.rs index 697790023d6..0f982df61e8 100644 --- a/tests/ui/lang-items/lang-item-generic-requirements.rs +++ b/tests/ui/lang-items/lang-item-generic-requirements.rs @@ -9,30 +9,30 @@ trait MySized {} #[lang = "add"] trait MyAdd<'a, T> {} -//~^^ ERROR: `add` language item must be applied to a trait with 1 generic argument [E0718] +//~^^ ERROR: `add` lang item must be applied to a trait with 1 generic argument [E0718] #[lang = "drop_in_place"] -//~^ ERROR `drop_in_place` language item must be applied to a function with at least 1 generic +//~^ ERROR `drop_in_place` lang item must be applied to a function with at least 1 generic fn my_ptr_drop() {} #[lang = "index"] trait MyIndex<'a, T> {} -//~^^ ERROR: `index` language item must be applied to a trait with 1 generic argument [E0718] +//~^^ ERROR: `index` lang item must be applied to a trait with 1 generic argument [E0718] #[lang = "phantom_data"] -//~^ ERROR `phantom_data` language item must be applied to a struct with 1 generic argument +//~^ ERROR `phantom_data` lang item must be applied to a struct with 1 generic argument struct MyPhantomData<T, U>; //~^ ERROR `T` is never used //~| ERROR `U` is never used #[lang = "owned_box"] -//~^ ERROR `owned_box` language item must be applied to a struct with at least 1 generic argument +//~^ ERROR `owned_box` lang item must be applied to a struct with at least 1 generic argument struct Foo; // When the `start` lang item is missing generics very odd things can happen, especially when // it comes to cross-crate monomorphization #[lang = "start"] -//~^ ERROR `start` language item must be applied to a function with 1 generic argument [E0718] +//~^ ERROR `start` lang item must be applied to a function with 1 generic argument [E0718] fn start(_: *const u8, _: isize, _: *const *const u8) -> isize { 0 } diff --git a/tests/ui/lang-items/lang-item-generic-requirements.stderr b/tests/ui/lang-items/lang-item-generic-requirements.stderr index 30abdf84046..3de67d65940 100644 --- a/tests/ui/lang-items/lang-item-generic-requirements.stderr +++ b/tests/ui/lang-items/lang-item-generic-requirements.stderr @@ -1,4 +1,4 @@ -error[E0718]: `add` language item must be applied to a trait with 1 generic argument +error[E0718]: `add` lang item must be applied to a trait with 1 generic argument --> $DIR/lang-item-generic-requirements.rs:10:1 | LL | #[lang = "add"] @@ -6,7 +6,7 @@ LL | #[lang = "add"] LL | trait MyAdd<'a, T> {} | ------- this trait has 2 generic arguments -error[E0718]: `drop_in_place` language item must be applied to a function with at least 1 generic argument +error[E0718]: `drop_in_place` lang item must be applied to a function with at least 1 generic argument --> $DIR/lang-item-generic-requirements.rs:14:1 | LL | #[lang = "drop_in_place"] @@ -15,7 +15,7 @@ LL | LL | fn my_ptr_drop() {} | - this function has 0 generic arguments -error[E0718]: `index` language item must be applied to a trait with 1 generic argument +error[E0718]: `index` lang item must be applied to a trait with 1 generic argument --> $DIR/lang-item-generic-requirements.rs:18:1 | LL | #[lang = "index"] @@ -23,7 +23,7 @@ LL | #[lang = "index"] LL | trait MyIndex<'a, T> {} | ------- this trait has 2 generic arguments -error[E0718]: `phantom_data` language item must be applied to a struct with 1 generic argument +error[E0718]: `phantom_data` lang item must be applied to a struct with 1 generic argument --> $DIR/lang-item-generic-requirements.rs:22:1 | LL | #[lang = "phantom_data"] @@ -32,7 +32,7 @@ LL | LL | struct MyPhantomData<T, U>; | ------ this struct has 2 generic arguments -error[E0718]: `owned_box` language item must be applied to a struct with at least 1 generic argument +error[E0718]: `owned_box` lang item must be applied to a struct with at least 1 generic argument --> $DIR/lang-item-generic-requirements.rs:28:1 | LL | #[lang = "owned_box"] @@ -41,7 +41,7 @@ LL | LL | struct Foo; | - this struct has 0 generic arguments -error[E0718]: `start` language item must be applied to a function with 1 generic argument +error[E0718]: `start` lang item must be applied to a function with 1 generic argument --> $DIR/lang-item-generic-requirements.rs:34:1 | LL | #[lang = "start"] diff --git a/tests/ui/lang-items/start_lang_item_with_target_feature.rs b/tests/ui/lang-items/start_lang_item_with_target_feature.rs index 4717304c5c6..eb712ba4092 100644 --- a/tests/ui/lang-items/start_lang_item_with_target_feature.rs +++ b/tests/ui/lang-items/start_lang_item_with_target_feature.rs @@ -11,7 +11,7 @@ pub trait Sized {} #[lang = "start"] #[target_feature(enable = "avx2")] -//~^ ERROR `start` language item function is not allowed to have `#[target_feature]` +//~^ ERROR `start` lang item function is not allowed to have `#[target_feature]` fn start<T>(_main: fn() -> T, _argc: isize, _argv: *const *const u8, _sigpipe: u8) -> isize { 0 } diff --git a/tests/ui/lang-items/start_lang_item_with_target_feature.stderr b/tests/ui/lang-items/start_lang_item_with_target_feature.stderr index bb0583dfde0..6214e3f8bc7 100644 --- a/tests/ui/lang-items/start_lang_item_with_target_feature.stderr +++ b/tests/ui/lang-items/start_lang_item_with_target_feature.stderr @@ -1,11 +1,11 @@ -error: `start` language item function is not allowed to have `#[target_feature]` +error: `start` lang item function is not allowed to have `#[target_feature]` --> $DIR/start_lang_item_with_target_feature.rs:13:1 | LL | #[target_feature(enable = "avx2")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ LL | LL | fn start<T>(_main: fn() -> T, _argc: isize, _argv: *const *const u8, _sigpipe: u8) -> isize { - | ------------------------------------------------------------------------------------------- `start` language item function is not allowed to have `#[target_feature]` + | ------------------------------------------------------------------------------------------- `start` lang item function is not allowed to have `#[target_feature]` error: aborting due to 1 previous error |
