Skip to content

Commit 9604b59

Browse files
committed
Fix tests
1 parent b4fc8c5 commit 9604b59

File tree

9 files changed

+19
-17
lines changed

9 files changed

+19
-17
lines changed

src/libcoretest/any.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ fn any_fixed_vec() {
121121

122122
#[test]
123123
fn any_unsized() {
124-
fn is_any<T: Any + ?Sized>() {}
124+
fn is_any<_T: Any + ?Sized>() {}
125125
is_any::<[i32]>();
126126
}
127127

src/libserialize/serialize.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -674,8 +674,8 @@ pub trait SpecializationError {
674674
/// `T` is the type being encoded/decoded, and
675675
/// the arguments are the names of the trait
676676
/// and method that should've been overriden.
677-
fn not_found<S, T: ?Sized>(trait_name: &'static str,
678-
method_name: &'static str) -> Self;
677+
fn not_found<_S, _T: ?Sized>(trait_name: &'static str,
678+
method_name: &'static str) -> Self;
679679
}
680680

681681
impl<E> SpecializationError for E {

src/libstd/fs.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2684,7 +2684,7 @@ mod tests {
26842684

26852685
#[test]
26862686
fn _assert_send_sync() {
2687-
fn _assert_send_sync<T: Send + Sync>() {}
2687+
fn _assert_send_sync<_T: Send + Sync>() {}
26882688
_assert_send_sync::<OpenOptions>();
26892689
}
26902690

src/libstd/sys_common/thread_local.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,8 @@ impl Drop for Key {
235235
mod tests {
236236
use super::{Key, StaticKey};
237237

238-
fn assert_sync<T: Sync>() {}
239-
fn assert_send<T: Send>() {}
238+
fn assert_sync<_T: Sync>() {}
239+
fn assert_send<_T: Send>() {}
240240

241241
#[test]
242242
fn smoke() {

src/libsyntax/ast.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1981,7 +1981,7 @@ mod tests {
19811981
// are ASTs encodable?
19821982
#[test]
19831983
fn check_asts_encodable() {
1984-
fn assert_encodable<T: serialize::Encodable>() {}
1984+
fn assert_encodable<_T: serialize::Encodable>() {}
19851985
assert_encodable::<Crate>();
19861986
}
19871987
}

src/test/ui/compare-method/proj-outlives-region.rs

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// except according to those terms.
1010

1111
#![allow(dead_code)]
12+
#![allow(unused_type_parameters)]
1213
#![deny(extra_requirement_in_impl)]
1314

1415
// Test that we elaborate `Type: 'region` constraints and infer various important things.

src/test/ui/compare-method/proj-outlives-region.stderr

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
error[E0276]: impl has stricter requirements than trait
2-
--> $DIR/proj-outlives-region.rs:22:5
2+
--> $DIR/proj-outlives-region.rs:23:5
33
|
4-
17 | fn foo() where T: 'a;
4+
18 | fn foo() where T: 'a;
55
| --------------------- definition of `foo` from trait
66
...
7-
22 | fn foo() where U: 'a { } //~ ERROR E0276
7+
23 | fn foo() where U: 'a { } //~ ERROR E0276
88
| ^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `U: 'a`
99
|
1010
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
1111
= note: for more information, see issue #37166 <https://github.com/rust-lang/rust/issues/37166>
1212
note: lint level defined here
13-
--> $DIR/proj-outlives-region.rs:12:9
13+
--> $DIR/proj-outlives-region.rs:13:9
1414
|
15-
12 | #![deny(extra_requirement_in_impl)]
15+
13 | #![deny(extra_requirement_in_impl)]
1616
| ^^^^^^^^^^^^^^^^^^^^^^^^^
1717

1818
error: aborting due to previous error

src/test/ui/compare-method/region-unrelated.rs

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// except according to those terms.
1010

1111
#![allow(dead_code)]
12+
#![allow(unused_type_parameters)]
1213
#![deny(extra_requirement_in_impl)]
1314

1415
// Test that we elaborate `Type: 'region` constraints and infer various important things.

src/test/ui/compare-method/region-unrelated.stderr

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
error[E0276]: impl has stricter requirements than trait
2-
--> $DIR/region-unrelated.rs:22:5
2+
--> $DIR/region-unrelated.rs:23:5
33
|
4-
17 | fn foo() where T: 'a;
4+
18 | fn foo() where T: 'a;
55
| --------------------- definition of `foo` from trait
66
...
7-
22 | fn foo() where V: 'a { }
7+
23 | fn foo() where V: 'a { }
88
| ^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `V: 'a`
99
|
1010
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
1111
= note: for more information, see issue #37166 <https://github.com/rust-lang/rust/issues/37166>
1212
note: lint level defined here
13-
--> $DIR/region-unrelated.rs:12:9
13+
--> $DIR/region-unrelated.rs:13:9
1414
|
15-
12 | #![deny(extra_requirement_in_impl)]
15+
13 | #![deny(extra_requirement_in_impl)]
1616
| ^^^^^^^^^^^^^^^^^^^^^^^^^
1717

1818
error: aborting due to previous error

0 commit comments

Comments
 (0)