File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -95,32 +95,28 @@ impl Baz for Bar3 {
9595 unsafe fn provided_override ( & self ) { } //~ ERROR: implementation of an `unsafe` method
9696}
9797
98- unsafe trait B {
99- fn dummy ( & self ) { }
100- }
101-
102- trait C {
98+ trait B {
10399 #[ allow( unsafe_code) ]
104100 unsafe fn baz ( & self ) ;
105101 unsafe fn provided ( & self ) { } //~ ERROR: implementation of an `unsafe` method
106102}
107103
108- impl C for Bar {
104+ impl B for Bar {
109105 #[ allow( unsafe_code) ]
110106 unsafe fn baz ( & self ) { }
111107 unsafe fn provided ( & self ) { } //~ ERROR: implementation of an `unsafe` method
112108}
113109
114- impl C for Bar2 {
110+ impl B for Bar2 {
115111 unsafe fn baz ( & self ) { } //~ ERROR: implementation of an `unsafe` method
116112}
117113
118- trait D {
114+ trait C {
119115 #[ allow( unsafe_code) ]
120116 unsafe fn unsafe_provided ( & self ) { }
121117}
122118
123- impl D for Bar { }
119+ impl C for Bar { }
124120
125121fn main ( ) {
126122 unsafe { } //~ ERROR: usage of an `unsafe` block
Original file line number Diff line number Diff line change @@ -126,25 +126,25 @@ LL | unsafe fn provided_override(&self) {}
126126 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
127127
128128error: implementation of an `unsafe` method
129- --> $DIR/lint-unsafe-code.rs:106 :5
129+ --> $DIR/lint-unsafe-code.rs:101 :5
130130 |
131131LL | unsafe fn provided(&self) {}
132132 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
133133
134134error: implementation of an `unsafe` method
135- --> $DIR/lint-unsafe-code.rs:112 :5
135+ --> $DIR/lint-unsafe-code.rs:107 :5
136136 |
137137LL | unsafe fn provided(&self) {}
138138 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
139139
140140error: implementation of an `unsafe` method
141- --> $DIR/lint-unsafe-code.rs:116 :5
141+ --> $DIR/lint-unsafe-code.rs:111 :5
142142 |
143143LL | unsafe fn baz(&self) {}
144144 | ^^^^^^^^^^^^^^^^^^^^^^^
145145
146146error: usage of an `unsafe` block
147- --> $DIR/lint-unsafe-code.rs:127 :5
147+ --> $DIR/lint-unsafe-code.rs:122 :5
148148 |
149149LL | unsafe {}
150150 | ^^^^^^^^^
You can’t perform that action at this time.
0 commit comments