diff options
Diffstat (limited to 'tests/ui/lazy-type-alias/extern-crate-has-lazy-type-aliases.rs')
-rw-r--r-- | tests/ui/lazy-type-alias/extern-crate-has-lazy-type-aliases.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ui/lazy-type-alias/extern-crate-has-lazy-type-aliases.rs b/tests/ui/lazy-type-alias/extern-crate-has-lazy-type-aliases.rs new file mode 100644 index 000000000..31a19161b --- /dev/null +++ b/tests/ui/lazy-type-alias/extern-crate-has-lazy-type-aliases.rs @@ -0,0 +1,16 @@ +// revisions: locally_eager locally_lazy +// aux-crate:lazy=lazy.rs +// edition: 2021 + +// Test that we treat lazy type aliases from external crates as lazy independently of whether the +// local crate enables `lazy_type_alias` or not. + +#![cfg_attr( + locally_lazy, + feature(lazy_type_alias), + allow(incomplete_features) +)] + +fn main() { + let _: lazy::Alias<String>; //~ ERROR the trait bound `String: Copy` is not satisfied +} |