Skip to content

Commit a8f3a2a

Browse files
committed
use rustc_no_implicit_bounds
1 parent c179e66 commit a8f3a2a

2 files changed

Lines changed: 8 additions & 16 deletions

File tree

tests/ui/traits/non_lifetime_binders/normalized-param-env-unconstrained-type-120033.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
// Regression test for <https://github.com/rust-lang/rust/issues/120033>
44

5+
#![feature(rustc_attrs)]
56
#![feature(non_lifetime_binders)] //~ WARN the feature `non_lifetime_binders` is incomplete
6-
#![allow(sized_hierarchy_migration)] //~ WARN unknown lint: `sized_hierarchy_migration`
7-
#![feature(sized_hierarchy)] // added to keep parameters unconstrained
7+
#![rustc_no_implicit_bounds]
88

9-
pub trait Foo<T: std::marker::PointeeSized> {
10-
type Bar<K: std::marker::PointeeSized>;
9+
pub trait Foo<T> {
10+
type Bar<K>;
1111
}
1212

1313
pub struct Bar<T: ?AutoTrait> {} //~ ERROR cannot find trait `AutoTrait`

tests/ui/traits/non_lifetime_binders/normalized-param-env-unconstrained-type-120033.stderr

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,8 @@ error[E0405]: cannot find trait `AutoTrait` in this scope
44
LL | pub struct Bar<T: ?AutoTrait> {}
55
| ^^^^^^^^^ not found in this scope
66

7-
warning: unknown lint: `sized_hierarchy_migration`
8-
--> $DIR/normalized-param-env-unconstrained-type-120033.rs:6:10
9-
|
10-
LL | #![allow(sized_hierarchy_migration)]
11-
| ^^^^^^^^^^^^^^^^^^^^^^^^^
12-
|
13-
= note: `#[warn(unknown_lints)]` on by default
14-
157
warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes
16-
--> $DIR/normalized-param-env-unconstrained-type-120033.rs:5:12
8+
--> $DIR/normalized-param-env-unconstrained-type-120033.rs:6:12
179
|
1810
LL | #![feature(non_lifetime_binders)]
1911
| ^^^^^^^^^^^^^^^^^^^^
@@ -30,7 +22,7 @@ LL | T1: for<T> Foo<usize, Bar = Bar<T>>,
3022
note: associated type defined here, with 1 generic parameter: `K`
3123
--> $DIR/normalized-param-env-unconstrained-type-120033.rs:10:10
3224
|
33-
LL | type Bar<K: std::marker::PointeeSized>;
25+
LL | type Bar<K>;
3426
| ^^^ -
3527
help: add missing generic argument
3628
|
@@ -46,15 +38,15 @@ LL | T1: for<T> Foo<usize, Bar = Bar<T>>,
4638
note: associated type defined here, with 1 generic parameter: `K`
4739
--> $DIR/normalized-param-env-unconstrained-type-120033.rs:10:10
4840
|
49-
LL | type Bar<K: std::marker::PointeeSized>;
41+
LL | type Bar<K>;
5042
| ^^^ -
5143
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
5244
help: add missing generic argument
5345
|
5446
LL | T1: for<T> Foo<usize, Bar<K> = Bar<T>>,
5547
| +++
5648

57-
error: aborting due to 3 previous errors; 2 warnings emitted
49+
error: aborting due to 3 previous errors; 1 warning emitted
5850

5951
Some errors have detailed explanations: E0107, E0405.
6052
For more information about an error, try `rustc --explain E0107`.

0 commit comments

Comments
 (0)