-// Checks that declaring a lang item with the wrong number
-// of generic arguments errors rather than crashing (issue #83893, #87573, part of #9307, #79559).
+// Checks that declaring a lang item with the wrong number of generic arguments errors rather than
+// crashing (issue #83474, #83893, #87573, part of #9307, #79559).
#![feature(lang_items, no_core)]
#![no_core]
//~^ ERROR parameter `T` is never used
//~| ERROR parameter `U` is never used
+#[lang = "owned_box"]
+//~^ ERROR `owned_box` language 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"]
// Use phantomdata
let _ = MyPhantomData::<(), i32>;
+
+ // Use Foo
+ let _: () = Foo;
}
// use `start`