Skip to content

Commit 9fc34e3

Browse files
committed
bless tests/ui/
1 parent 0abfe64 commit 9fc34e3

File tree

196 files changed

+251
-67
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

196 files changed

+251
-67
lines changed

tests/ui/anon-params/anon-params-deprecated.fixed

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// check-pass
55
// edition:2015
66
// run-rustfix
7+
#![allow(dead_code)]
78

89
trait T {
910
fn foo(_: i32); //~ WARNING anonymous parameters are deprecated

tests/ui/anon-params/anon-params-deprecated.rs

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// check-pass
55
// edition:2015
66
// run-rustfix
7+
#![allow(dead_code)]
78

89
trait T {
910
fn foo(i32); //~ WARNING anonymous parameters are deprecated

tests/ui/anon-params/anon-params-deprecated.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
warning: anonymous parameters are deprecated and will be removed in the next edition
2-
--> $DIR/anon-params-deprecated.rs:9:12
2+
--> $DIR/anon-params-deprecated.rs:10:12
33
|
44
LL | fn foo(i32);
55
| ^^^ help: try naming the parameter or explicitly ignoring it: `_: i32`
@@ -13,7 +13,7 @@ LL | #![warn(anonymous_parameters)]
1313
| ^^^^^^^^^^^^^^^^^^^^
1414

1515
warning: anonymous parameters are deprecated and will be removed in the next edition
16-
--> $DIR/anon-params-deprecated.rs:12:30
16+
--> $DIR/anon-params-deprecated.rs:13:30
1717
|
1818
LL | fn bar_with_default_impl(String, String) {}
1919
| ^^^^^^ help: try naming the parameter or explicitly ignoring it: `_: String`
@@ -22,7 +22,7 @@ LL | fn bar_with_default_impl(String, String) {}
2222
= note: for more information, see issue #41686 <https://github.com/rust-lang/rust/issues/41686>
2323

2424
warning: anonymous parameters are deprecated and will be removed in the next edition
25-
--> $DIR/anon-params-deprecated.rs:12:38
25+
--> $DIR/anon-params-deprecated.rs:13:38
2626
|
2727
LL | fn bar_with_default_impl(String, String) {}
2828
| ^^^^^^ help: try naming the parameter or explicitly ignoring it: `_: String`

tests/ui/associated-consts/associated-const-outer-ty-refs.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
// run-pass
2+
#![allow(dead_code)]
3+
24
trait Lattice {
35
const BOTTOM: Self;
46
}

tests/ui/associated-consts/associated-const-type-parameters.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// run-pass
2-
2+
#![allow(dead_code)]
33
trait Foo {
44
const X: i32;
55
fn get_x() -> i32 {

tests/ui/associated-type-bounds/dyn-impl-trait-type.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// run-pass
2-
2+
#![allow(dead_code)]
33
#![feature(associated_type_bounds)]
44

55
use std::ops::Add;

tests/ui/associated-type-bounds/dyn-rpit-and-let.rs

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
// FIXME: uncomment let binding types below when `impl_trait_in_bindings` feature is fixed.
44

5+
#![allow(dead_code)]
56
#![feature(associated_type_bounds)]
67

78
use std::ops::Add;

tests/ui/associated-type-bounds/rpit.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// run-pass
2-
2+
#![allow(dead_code)]
33
#![feature(associated_type_bounds)]
44

55
use std::ops::Add;

tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.fixed

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-rustfix
2+
#![allow(dead_code)]
23
trait O {
34
type M;
45
}

tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-rustfix
2+
#![allow(dead_code)]
23
trait O {
34
type M;
45
}

tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0308]: mismatched types
2-
--> $DIR/suggest-contraining-assoc-type-because-of-assoc-const.rs:12:21
2+
--> $DIR/suggest-contraining-assoc-type-because-of-assoc-const.rs:13:21
33
|
44
LL | const N: C::M = 4u8;
55
| ^^^ expected associated type, found `u8`

tests/ui/associated-type-bounds/trait-alias-impl-trait.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// run-pass
22

3+
#![allow(dead_code)]
34
#![feature(associated_type_bounds)]
45
#![feature(type_alias_impl_trait)]
56

tests/ui/associated-types/associated-types-for-unimpl-trait.fixed

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-rustfix
2+
#![allow(dead_code)]
23
#![allow(unused_variables)]
34

45
trait Get {

tests/ui/associated-types/associated-types-for-unimpl-trait.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-rustfix
2+
#![allow(dead_code)]
23
#![allow(unused_variables)]
34

45
trait Get {

tests/ui/associated-types/associated-types-for-unimpl-trait.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0277]: the trait bound `Self: Get` is not satisfied
2-
--> $DIR/associated-types-for-unimpl-trait.rs:10:40
2+
--> $DIR/associated-types-for-unimpl-trait.rs:11:40
33
|
44
LL | fn uhoh<U:Get>(&self, foo: U, bar: <Self as Get>::Value) {}
55
| ^^^^^^^^^^^^^^^^^^^^ the trait `Get` is not implemented for `Self`

tests/ui/associated-types/associated-types-in-bound-type-arg.rs

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// itself includes a `Self::Item` shorthand.
44
//
55
// Regression test for issue #33425.
6+
#![allow(dead_code)]
67

78
trait ParallelIterator {
89
type Item;

tests/ui/associated-types/associated-types-issue-20220.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// run-pass
22
// Test references to `Self::Item` in the trait. Issue #20220.
3+
#![allow(dead_code)]
34

45

56
use std::vec;

tests/ui/associated-types/associated-types-issue-20371.rs

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// before the actual trait.
44

55
// pretty-expanded FIXME #23616
6+
#![allow(dead_code)]
67

78
impl X for f64 { type Y = isize; }
89
trait X { type Y; }

tests/ui/associated-types/associated-types-nested-projections.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
#![allow(dead_code)]
23
#![allow(unused_variables)]
34
// Test that we can resolve nested projection types. Issue #20666.
45

tests/ui/associated-types/associated-types-normalize-in-bounds-ufcs.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
#![allow(dead_code)]
23
#![allow(unused_variables)]
34
// Test that we normalize associated types that appear in bounds; if
45
// we didn't, the call to `self.split2()` fails to type check.

tests/ui/associated-types/associated-types-normalize-in-bounds.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
#![allow(dead_code)]
23
#![allow(unused_variables)]
34
// Test that we normalize associated types that appear in bounds; if
45
// we didn't, the call to `self.split2()` fails to type check.

tests/ui/associated-types/associated-types-projection-bound-in-supertraits.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
#![allow(dead_code)]
23
#![allow(unused_variables)]
34
// Test that we correctly handle projection bounds appearing in the
45
// supertrait list (and in conjunction with overloaded operators). In

tests/ui/associated-types/associated-types-projection-from-known-type-in-impl.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// run-pass
22
// Test where the impl self type uses a projection from a constant type.
33

4+
#![allow(dead_code)]
45

56
trait Int
67
{

tests/ui/associated-types/associated-types-projection-to-unrelated-trait-in-method-without-default.fixed

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Check that we get an error when you use `<Self as Get>::Value` in
33
// the trait definition even if there is no default method.
44

5+
#![allow(dead_code)]
56
trait Get {
67
type Value;
78
}

tests/ui/associated-types/associated-types-projection-to-unrelated-trait-in-method-without-default.rs

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Check that we get an error when you use `<Self as Get>::Value` in
33
// the trait definition even if there is no default method.
44

5+
#![allow(dead_code)]
56
trait Get {
67
type Value;
78
}

tests/ui/associated-types/associated-types-projection-to-unrelated-trait-in-method-without-default.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0277]: the trait bound `Self: Get` is not satisfied
2-
--> $DIR/associated-types-projection-to-unrelated-trait-in-method-without-default.rs:10:40
2+
--> $DIR/associated-types-projection-to-unrelated-trait-in-method-without-default.rs:11:40
33
|
44
LL | fn okay<U:Get>(&self, foo: U, bar: <Self as Get>::Value);
55
| ^^^^^^^^^^^^^^^^^^^^ the trait `Get` is not implemented for `Self`

tests/ui/associated-types/associated-types-projection-to-unrelated-trait.rs

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
// See also tests associated-types-no-suitable-supertrait
77
// and associated-types-no-suitable-supertrait-2, which show how small
88
// variants of the code below can fail.
9+
#![allow(dead_code)]
910

1011
trait Get {
1112
type Value;

tests/ui/associated-types/associated-types-qualified-path-with-trait-with-type-parameters.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// run-pass
22
// pretty-expanded FIXME #23616
3+
#![allow(dead_code)]
34

45
trait Foo<T> {
56
type Bar;

tests/ui/associated-types/associated-types-resolve-lifetime.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// run-pass
22
// pretty-expanded FIXME #23616
33

4+
#![allow(dead_code)]
45
trait Get<T> {
56
fn get(&self) -> T;
67
}

tests/ui/auto-traits/auto-trait-validation.fixed

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#![feature(auto_traits)]
2+
#![allow(dead_code)]
23

34
// run-rustfix
45

tests/ui/auto-traits/auto-trait-validation.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#![feature(auto_traits)]
2+
#![allow(dead_code)]
23

34
// run-rustfix
45

tests/ui/auto-traits/auto-trait-validation.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
error[E0567]: auto traits cannot have generic parameters
2-
--> $DIR/auto-trait-validation.rs:5:19
2+
--> $DIR/auto-trait-validation.rs:6:19
33
|
44
LL | auto trait Generic<T> {}
55
| -------^^^ help: remove the parameters
66
| |
77
| auto trait cannot have generic parameters
88

99
error[E0568]: auto traits cannot have super traits or lifetime bounds
10-
--> $DIR/auto-trait-validation.rs:7:17
10+
--> $DIR/auto-trait-validation.rs:8:17
1111
|
1212
LL | auto trait Bound : Copy {}
1313
| -----^^^^^^^ help: remove the super traits or lifetime bounds
1414
| |
1515
| auto traits cannot have super traits or lifetime bounds
1616

1717
error[E0568]: auto traits cannot have super traits or lifetime bounds
18-
--> $DIR/auto-trait-validation.rs:9:25
18+
--> $DIR/auto-trait-validation.rs:10:25
1919
|
2020
LL | auto trait LifetimeBound : 'static {}
2121
| -------------^^^^^^^^^^ help: remove the super traits or lifetime bounds
2222
| |
2323
| auto traits cannot have super traits or lifetime bounds
2424

2525
error[E0380]: auto traits cannot have associated items
26-
--> $DIR/auto-trait-validation.rs:11:25
26+
--> $DIR/auto-trait-validation.rs:12:25
2727
|
2828
LL | auto trait MyTrait { fn foo() {} }
2929
| ------- ---^^^-----

tests/ui/auto-traits/auto-traits.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
#![allow(dead_code)]
23
#![allow(unused_doc_comments)]
34
#![feature(auto_traits)]
45
#![feature(negative_impls)]

tests/ui/builtin-superkinds/builtin-superkinds-in-metadata2.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// run-pass
22

3+
#![allow(dead_code)]
34
#![allow(unused_imports)]
45

56
// aux-build:trait_superkinds_in_metadata.rs

tests/ui/builtin-superkinds/builtin-superkinds-simple2.rs

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Simple test case of implementing a trait with super-builtin-kinds.
33

44
// pretty-expanded FIXME #23616
5+
#![allow(dead_code)]
56

67
trait Foo : Send { }
78

tests/ui/builtin-superkinds/builtin-superkinds-typaram.rs

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// using a bounded type parameter.
44

55
// pretty-expanded FIXME #23616
6+
#![allow(dead_code)]
67

78
trait Foo : Send { }
89

tests/ui/cast/cast-rfc0401-vtable-kinds.rs

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Check that you can cast between different pointers to trait objects
33
// whose vtable have the same kind (both lengths, or both trait pointers).
44

5+
#![allow(dead_code)]
56
#![feature(unsized_tuple_coercion)]
67

78
trait Foo<T> {

tests/ui/cast/fat-ptr-cast-rpass.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// run-pass
22

3+
#![allow(dead_code)]
34
#![feature(ptr_metadata)]
45

56
trait Foo {

tests/ui/coercion/issue-14589.rs

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// coerced to a trait object
44

55
// pretty-expanded FIXME #23616
6+
#![allow(dead_code)]
67

78
fn main() {
89
send::<Box<dyn Foo>>(Box::new(Output(0)));

tests/ui/coherence/coherence-multidispatch-tuple.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
#![allow(dead_code)]
23
#![allow(unused_imports)]
34
// pretty-expanded FIXME #23616
45

tests/ui/const-generics/associated-type-bound.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
#![allow(dead_code)]
23
trait Bar<const N: usize> {}
34

45
trait Foo<const N: usize> {

tests/ui/const-generics/condition-in-trait-const-arg.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Checks that `impl Trait<{anon_const}> for Type` evaluates successfully.
22
// run-pass
33
// revisions: full min
4+
#![allow(dead_code)]
45

56
#![cfg_attr(full, feature(generic_const_exprs))]
67
#![cfg_attr(full, allow(incomplete_features))]

tests/ui/const-generics/dyn-supertraits.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
#![allow(dead_code)]
23

34
trait Foo<const N: usize> {
45
fn myfun(&self) -> usize;

tests/ui/const-generics/issues/issue-69654-run-pass.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
#![allow(dead_code)]
23
trait Bar<T> {}
34
impl<T> Bar<T> for [u8; 7] {}
45

tests/ui/consts/const-block-item.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
#![allow(dead_code)]
23
#![allow(unused_imports)]
34

45
mod foo {

tests/ui/consts/underscore_const_names.rs

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
#![deny(unused)]
44

5+
#[allow(dead_code)]
56
trait Trt {}
67
pub struct Str {}
78
impl Trt for Str {}

tests/ui/default-method-parsing.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// run-pass
22
// pretty-expanded FIXME #23616
3+
#![allow(dead_code)]
34

45
trait Foo {
56
fn m(&self, _:isize) { }

tests/ui/deriving/deriving-bounds.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
#![allow(dead_code)]
23
#[derive(Copy, Clone)]
34
struct Test;
45

tests/ui/drop/drop-struct-as-object.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
#![allow(dead_code)]
23
#![allow(unused_variables)]
34
#![allow(non_upper_case_globals)]
45

tests/ui/dynamically-sized-types/dst-coercions.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
#![allow(dead_code)]
23
#![allow(unused_variables)]
34
// Test coercions involving DST and/or raw pointers
45

0 commit comments

Comments
 (0)