rust/tests/ui/tuple
Esteban Küber 68253e14ee Don't suggest restricting bound with unstable traits on stable
On nightly, we mention the trait is unstable

```
error[E0277]: the trait bound `T: Unstable` is not satisfied
  --> $DIR/unstable-trait-suggestion.rs:13:9
   |
LL |     foo(t)
   |     --- ^ the trait `Unstable` is not implemented for `T`
   |     |
   |     required by a bound introduced by this call
   |
note: required by a bound in `foo`
  --> $DIR/unstable-trait-suggestion.rs:9:11
   |
LL | fn foo<T: Unstable>(_: T) {}
   |           ^^^^^^^^ required by this bound in `foo`
help: consider restricting type parameter `T` but it is an `unstable` trait
   |
LL | pub fn demo<T: Unstable>(t: T) {
   |              ++++++++++
```

On stable, we don't suggest the trait at all

```
error[E0277]: the trait bound `T: Unstable` is not satisfied
  --> $DIR/unstable-trait-suggestion.rs:13:9
   |
LL |     foo(t)
   |     --- ^ the trait `Unstable` is not implemented for `T`
   |     |
   |     required by a bound introduced by this call
   |
note: required by a bound in `foo`
  --> $DIR/unstable-trait-suggestion.rs:9:11
   |
LL | fn foo<T: Unstable>(_: T) {}
   |           ^^^^^^^^ required by this bound in `foo`
```
2024-12-07 21:10:44 +00:00
..
tuple-struct-fields
add-tuple-within-arguments.rs
add-tuple-within-arguments.stderr
array-diagnostics.rs
array-diagnostics.stderr
builtin-fail.rs
builtin-fail.stderr Don't suggest restricting bound with unstable traits on stable 2024-12-07 21:10:44 +00:00
builtin.rs
index-float.rs
index-invalid.rs
index-invalid.stderr
indexing-in-macro.rs
nested-index.rs
one-tuple.rs
tup.rs
tuple-arity-mismatch.rs
tuple-arity-mismatch.stderr
tuple-index-fat-types.rs
tuple-index-not-tuple.rs
tuple-index-not-tuple.stderr
tuple-index-out-of-bounds.rs
tuple-index-out-of-bounds.stderr
tuple-index.rs
wrong_argument_ice-2.rs
wrong_argument_ice-2.stderr
wrong_argument_ice-3.rs
wrong_argument_ice-3.stderr Use ordinal number in argument error 2024-07-14 13:50:09 +09:00
wrong_argument_ice-4.rs
wrong_argument_ice-4.stderr
wrong_argument_ice.rs
wrong_argument_ice.stderr