diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2025-06-27 15:04:52 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-27 15:04:52 +0200 |
| commit | 80f20c98f3bb38afc2747dcbec5fc57f6ebbef61 (patch) | |
| tree | 85c32e673a3de67216cc165e1c52762809f83fa8 /tests/ui/traits/next-solver/overflow/recursion-limit-normalizes-to-constraints.rs | |
| parent | aab2c20285e90395a597df270d8ae890814dfc4c (diff) | |
| parent | 1fd13fddba59ab686d5a01c6ad182a5bc109fe00 (diff) | |
| download | rust-80f20c98f3bb38afc2747dcbec5fc57f6ebbef61.tar.gz rust-80f20c98f3bb38afc2747dcbec5fc57f6ebbef61.zip | |
Rollup merge of #142671 - davidtwco:no-default-bounds-attr, r=lcnr
add #![rustc_no_implicit_bounds] Follow-up from rust-lang/rust#137944. Adds a new `rustc_attrs` attribute that stops rustc from adding any default bounds. Useful for tests where default bounds just add noise and make debugging harder. After reviewing all tests with `?Sized`, these tests seem like they could probably benefit from `#![rustc_no_implicit_bounds]`. - Skipping most of `tests/ui/unsized` as these seem to want to test `?Sized` - Skipping tests that used `Box<T>` because it's still bound by `T: MetaSized` - Skipping parsing or other tests that cared about `?Sized` syntactically - Skipping tests for `derive(CoercePointee)` because this appears to check that the pointee type is relaxed with `?Sized` explicitly r? `@lcnr`
Diffstat (limited to 'tests/ui/traits/next-solver/overflow/recursion-limit-normalizes-to-constraints.rs')
| -rw-r--r-- | tests/ui/traits/next-solver/overflow/recursion-limit-normalizes-to-constraints.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/ui/traits/next-solver/overflow/recursion-limit-normalizes-to-constraints.rs b/tests/ui/traits/next-solver/overflow/recursion-limit-normalizes-to-constraints.rs index dee5500aadd..e5a57a44d49 100644 --- a/tests/ui/traits/next-solver/overflow/recursion-limit-normalizes-to-constraints.rs +++ b/tests/ui/traits/next-solver/overflow/recursion-limit-normalizes-to-constraints.rs @@ -1,5 +1,7 @@ //@ compile-flags: -Znext-solver=coherence //@ check-pass +#![feature(rustc_attrs)] +#![rustc_no_implicit_bounds] // A regression test for trait-system-refactor-initiative#70. @@ -7,8 +9,8 @@ trait Trait { type Assoc; } -struct W<T: ?Sized>(*mut T); -impl<T: ?Sized> Trait for W<W<T>> +struct W<T>(*mut T); +impl<T> Trait for W<W<T>> where W<T>: Trait, { @@ -20,6 +22,6 @@ impl<T: Trait<Assoc = u32>> NoOverlap for T {} // `Projection(<W<_> as Trait>::Assoc, u32)` should result in error even // though applying the impl results in overflow. This is necessary to match // the behavior of the old solver. -impl<T: ?Sized> NoOverlap for W<T> {} +impl<T> NoOverlap for W<T> {} fn main() {} |
