Skip to content

Commit e359e6b

Browse files
committed
Bless other tests due to deny-by-default
1 parent 047cc8b commit e359e6b

File tree

105 files changed

+305
-179
lines changed

Some content is hidden

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

105 files changed

+305
-179
lines changed

tests/codegen-units/item-collection/generic-impl.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ impl<T> Struct<T> {
2222
}
2323
}
2424

25+
#[allow(unconstructable_pub_struct)]
2526
pub struct LifeTimeOnly<'a> {
2627
_a: &'a u32,
2728
}

tests/codegen-units/item-collection/overloaded-operators.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
use std::ops::{Add, Deref, Index, IndexMut};
77

8+
#[allow(unconstructable_pub_struct)]
89
pub struct Indexable {
910
data: [u8; 3],
1011
}
@@ -27,6 +28,7 @@ impl IndexMut<usize> for Indexable {
2728

2829
//~ MONO_ITEM fn <Equatable as std::cmp::PartialEq>::eq
2930
//~ MONO_ITEM fn <Equatable as std::cmp::PartialEq>::ne
31+
#[allow(unconstructable_pub_struct)]
3032
#[derive(PartialEq)]
3133
pub struct Equatable(u32);
3234

tests/crashes/130797.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
//@ known-bug: #130797
22

3+
#![allow(unconstructable_pub_struct)]
4+
35
trait Transform {
46
type Output<'a>;
57
}

tests/crashes/98322.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//@ known-bug: #98322
22

33
#![feature(generic_const_exprs)]
4+
#![allow(unconstructable_pub_struct)]
45

56
// Main function seems irrelevant
67
fn main() {}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
//@ check-pass
22

3+
#![allow(unconstructable_pub_struct)]
4+
35
pub struct Flatten<I>
46
where
57
I: Iterator<Item: IntoIterator>,

tests/ui/associated-types/unioned-keys-with-associated-type-23442.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// https://github.com/rust-lang/rust/issues/23442
22
//@ check-pass
33
#![allow(dead_code)]
4+
#![allow(unconstructable_pub_struct)]
45
use std::marker::PhantomData;
56

67
pub struct UnionedKeys<'a,K>

tests/ui/borrowck/issue-115259-suggest-iter-mut.fixed

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//@ run-rustfix
22
#![allow(unused_mut)]
33
#![allow(dead_code)]
4+
#![allow(unconstructable_pub_struct)]
45

56
pub trait Layer {
67
fn process(&mut self) -> u32;

tests/ui/borrowck/issue-115259-suggest-iter-mut.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//@ run-rustfix
22
#![allow(unused_mut)]
33
#![allow(dead_code)]
4+
#![allow(unconstructable_pub_struct)]
45

56
pub trait Layer {
67
fn process(&mut self) -> u32;

tests/ui/borrowck/issue-115259-suggest-iter-mut.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0596]: cannot borrow `**layer` as mutable, as it is behind a `&` reference
2-
--> $DIR/issue-115259-suggest-iter-mut.rs:15:65
2+
--> $DIR/issue-115259-suggest-iter-mut.rs:16:65
33
|
44
LL | self.layers.iter().fold(0, |result, mut layer| result + layer.process())
55
| --------- ^^^^^ `layer` is a `&` reference, so it cannot be borrowed as mutable

tests/ui/borrowck/struct-with-reference-to-trait-5708.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// https://github.com/rust-lang/rust/issues/5708
22
//@ run-pass
33
#![allow(unused_variables)]
4+
#![allow(unconstructable_pub_struct)]
45
/*
56
# ICE when returning struct with reference to trait
67

0 commit comments

Comments
 (0)