Skip to content

Commit 345fc07

Browse files
committed
Remove problematic error annotations.
1 parent 7dbe12a commit 345fc07

File tree

7 files changed

+3
-31
lines changed

7 files changed

+3
-31
lines changed

tests/ui/crashes/ice-6255.rs

-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,3 @@ fn main() {
1212
}
1313

1414
define_other_core!();
15-
//~^ ERROR: macro-expanded `extern crate` items cannot shadow names passed with `--extern`

tests/ui/declare_interior_mutable_const/others.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ macro_rules! declare_const {
1616
const $name: $ty = $e;
1717
};
1818
}
19-
declare_const!(_ONCE: Once = Once::new()); //~ ERROR: interior mutable
19+
declare_const!(_ONCE: Once = Once::new());
2020

2121
// const ATOMIC_REF: &AtomicUsize = &AtomicUsize::new(7); // This will simply trigger E0492.
2222

@@ -49,7 +49,7 @@ mod issue_8493 {
4949
};
5050
}
5151

52-
issue_8493!(); //~ ERROR: interior mutable
52+
issue_8493!();
5353
}
5454

5555
fn main() {}

tests/ui/declare_interior_mutable_const/traits.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ trait ConcreteTypes {
1515
const ATOMIC: AtomicUsize; //~ ERROR: interior mutable
1616
const INTEGER: u64;
1717
const STRING: String;
18-
declare_const!(ANOTHER_ATOMIC: AtomicUsize = Self::ATOMIC); //~ ERROR: interior mutable
18+
declare_const!(ANOTHER_ATOMIC: AtomicUsize = Self::ATOMIC);
1919
}
2020

2121
impl ConcreteTypes for u64 {

tests/ui/iter_filter_is_ok.rs

-12
Original file line numberDiff line numberDiff line change
@@ -9,51 +9,39 @@
99
fn main() {
1010
{
1111
let _ = vec![Ok(1), Err(2), Ok(3)].into_iter().filter(Result::is_ok);
12-
//~^ HELP: consider using `flatten` instead
1312
let _ = vec![Ok(1), Err(2), Ok(3)].into_iter().filter(|a| a.is_ok());
14-
//~^ HELP: consider using `flatten` instead
1513
#[rustfmt::skip]
1614
let _ = vec![Ok(1), Err(2)].into_iter().filter(|o| { o.is_ok() });
17-
//~^ HELP: consider using `flatten` instead
1815
}
1916

2017
{
2118
let _ = vec![Ok(1), Err(2), Ok(3)].into_iter().filter(|&a| a.is_ok());
22-
//~^ HELP: consider using `flatten` instead
2319

2420
let _ = vec![Ok(1), Err(2), Ok(3)].into_iter().filter(|&a| a.is_ok());
25-
//~^ HELP: consider using `flatten` instead
2621

2722
#[rustfmt::skip]
2823
let _ = vec![Ok(1), Err(2)].into_iter().filter(|&o| { o.is_ok() });
29-
//~^ HELP: consider using `flatten` instead
3024
}
3125

3226
{
3327
let _ = vec![Ok(1), Err(2), Ok(3)]
3428
.into_iter()
3529
.filter(std::result::Result::is_ok);
36-
//~^ HELP: consider using `flatten` instead
3730

3831
let _ = vec![Ok(1), Err(2), Ok(3)]
3932
.into_iter()
4033
.filter(|a| std::result::Result::is_ok(a));
41-
//~^ HELP: consider using `flatten` instead
4234
#[rustfmt::skip]
4335
let _ = vec![Ok(1), Err(2), Ok(3)].into_iter().filter(|a| { std::result::Result::is_ok(a) });
44-
//~^ HELP: consider using `flatten` instead
4536
}
4637

4738
{
4839
let _ = vec![Ok(1), Err(2), Ok(3)].into_iter().filter(|ref a| a.is_ok());
49-
//~^ HELP: consider using `flatten` instead
5040

5141
let _ = vec![Ok(1), Err(2), Ok(3)].into_iter().filter(|ref a| a.is_ok());
52-
//~^ HELP: consider using `flatten` instead
5342

5443
#[rustfmt::skip]
5544
let _ = vec![Ok(1), Err(2)].into_iter().filter(|ref o| { o.is_ok() });
56-
//~^ HELP: consider using `flatten` instead
5745
}
5846
}
5947

tests/ui/iter_filter_is_some.rs

-10
Original file line numberDiff line numberDiff line change
@@ -12,45 +12,35 @@ use std::collections::HashMap;
1212
fn main() {
1313
{
1414
let _ = vec![Some(1), None, Some(3)].into_iter().filter(Option::is_some);
15-
//~^ HELP: consider using `flatten` instead
1615
let _ = vec![Some(1), None, Some(3)].into_iter().filter(|a| a.is_some());
17-
//~^ HELP: consider using `flatten` instead
1816
#[rustfmt::skip]
1917
let _ = vec![Some(1), None, Some(3)].into_iter().filter(|o| { o.is_some() });
20-
//~^ HELP: consider using `flatten` instead
2118
}
2219

2320
{
2421
let _ = vec![Some(1), None, Some(3)]
2522
.into_iter()
2623
.filter(std::option::Option::is_some);
27-
//~^ HELP: consider using `flatten` instead
2824

2925
let _ = vec![Some(1), None, Some(3)]
3026
.into_iter()
3127
.filter(|a| std::option::Option::is_some(a));
32-
//~^ HELP: consider using `flatten` instead
3328
#[rustfmt::skip]
3429
let _ = vec![Some(1), None, Some(3)].into_iter().filter(|a| { std::option::Option::is_some(a) });
35-
//~^ HELP: consider using `flatten` instead
3630
}
3731

3832
{
3933
let _ = vec![Some(1), None, Some(3)].into_iter().filter(|&a| a.is_some());
40-
//~^ HELP: consider using `flatten` instead
4134

4235
#[rustfmt::skip]
4336
let _ = vec![Some(1), None, Some(3)].into_iter().filter(|&o| { o.is_some() });
44-
//~^ HELP: consider using `flatten` instead
4537
}
4638

4739
{
4840
let _ = vec![Some(1), None, Some(3)].into_iter().filter(|ref a| a.is_some());
49-
//~^ HELP: consider using `flatten` instead
5041

5142
#[rustfmt::skip]
5243
let _ = vec![Some(1), None, Some(3)].into_iter().filter(|ref o| { o.is_some() });
53-
//~^ HELP: consider using `flatten` instead
5444
}
5545
}
5646

tests/ui/struct_fields.rs

-4
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,6 @@ mod macro_tests {
231231
};
232232
}
233233
mk_struct!();
234-
//~^ ERROR: all fields have the same prefix: `some`
235234

236235
macro_rules! mk_struct2 {
237236
() => {
@@ -243,7 +242,6 @@ mod macro_tests {
243242
};
244243
}
245244
mk_struct2!();
246-
//~^ ERROR: field name starts with the struct's name
247245

248246
macro_rules! mk_struct_with_names {
249247
($struct_name:ident, $field:ident) => {
@@ -256,7 +254,6 @@ mod macro_tests {
256254
}
257255
// expands to `struct Foo { foo: i32, ... }`
258256
mk_struct_with_names!(Foo, foo);
259-
//~^ ERROR: field name starts with the struct's name
260257

261258
// expands to a struct with all fields starting with `other` but should not
262259
// be linted because some fields come from the macro definition and the other from the input
@@ -296,7 +293,6 @@ mod macro_tests {
296293
};
297294
}
298295
mk_struct_full_def!(PrefixData, some_data, some_meta, some_other);
299-
//~^ ERROR: all fields have the same prefix: `some`
300296
}
301297

302298
// should not lint on external code

tests/ui/unconditional_recursion.rs

-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ macro_rules! impl_partial_eq {
156156
struct S5;
157157

158158
impl_partial_eq!(S5);
159-
//~^ ERROR: function cannot return without recursing
160159

161160
struct S6 {
162161
field: String,

0 commit comments

Comments
 (0)