@@ -15,15 +15,15 @@ LL | final trait Trait {
1515 = note: only associated functions in traits can be `final`
1616
1717error: a static item cannot be `final`
18- --> $DIR/positions.rs:67 :5
18+ --> $DIR/positions.rs:65 :5
1919 |
2020LL | final static FOO_EXTERN: usize = 0;
2121 | ^^^^^ `final` because of this
2222 |
2323 = note: only associated functions in traits can be `final`
2424
2525error: an extern block cannot be `final`
26- --> $DIR/positions.rs:58 :1
26+ --> $DIR/positions.rs:56 :1
2727 |
2828LL | final unsafe extern "C" {
2929 | ^^^^^ `final` because of this
@@ -87,55 +87,55 @@ LL | final type Foo = ();
8787 | `final` because of this
8888
8989error: `final` is only allowed on associated functions in traits
90- --> $DIR/positions.rs:43 :5
90+ --> $DIR/positions.rs:42 :5
9191 |
9292LL | final const FOO: usize = 1;
9393 | -----^^^^^^^^^^^^^^^^^^^^^^
9494 | |
9595 | `final` because of this
9696
9797error: `final` is only allowed on associated functions in traits
98- --> $DIR/positions.rs:49 :1
98+ --> $DIR/positions.rs:47 :1
9999 |
100100LL | final fn foo() {}
101101 | -----^^^^^^^^^
102102 | |
103103 | `final` because of this
104104
105105error: `final` is only allowed on associated functions in traits
106- --> $DIR/positions.rs:52 :1
106+ --> $DIR/positions.rs:50 :1
107107 |
108108LL | final type FooTy = ();
109109 | -----^^^^^^^^^^^^^^^^^
110110 | |
111111 | `final` because of this
112112
113113error: `final` is only allowed on associated functions in traits
114- --> $DIR/positions.rs:55 :1
114+ --> $DIR/positions.rs:53 :1
115115 |
116116LL | final const FOO: usize = 0;
117117 | -----^^^^^^^^^^^^^^^^^^^^^^
118118 | |
119119 | `final` because of this
120120
121121error: `final` is only allowed on associated functions in traits
122- --> $DIR/positions.rs:61 :5
122+ --> $DIR/positions.rs:59 :5
123123 |
124124LL | final fn foo_extern();
125125 | -----^^^^^^^^^^^^^^^^^
126126 | |
127127 | `final` because of this
128128
129129error: `final` is only allowed on associated functions in traits
130- --> $DIR/positions.rs:64 :5
130+ --> $DIR/positions.rs:62 :5
131131 |
132132LL | final type FooExtern;
133133 | -----^^^^^^^^^^^^^^^^
134134 | |
135135 | `final` because of this
136136
137137error: incorrect `static` inside `extern` block
138- --> $DIR/positions.rs:67 :18
138+ --> $DIR/positions.rs:65 :18
139139 |
140140LL | final unsafe extern "C" {
141141 | ----------------------- `extern` blocks define existing foreign statics and statics inside of them cannot have a body
@@ -159,29 +159,5 @@ note: `method` is marked final here
159159LL | final fn method() {}
160160 | ^^^^^^^^^^^^^^^^^
161161
162- error: cannot override `Foo` because it already has a `final` definition in the trait
163- --> $DIR/positions.rs:39:5
164- |
165- LL | final type Foo = ();
166- | ^^^^^^^^^^^^^^
167- |
168- note: `Foo` is marked final here
169- --> $DIR/positions.rs:16:5
170- |
171- LL | final type Foo = ();
172- | ^^^^^^^^^^^^^^
173-
174- error: cannot override `FOO` because it already has a `final` definition in the trait
175- --> $DIR/positions.rs:43:5
176- |
177- LL | final const FOO: usize = 1;
178- | ^^^^^^^^^^^^^^^^^^^^^^
179- |
180- note: `FOO` is marked final here
181- --> $DIR/positions.rs:19:5
182- |
183- LL | final const FOO: usize = 1;
184- | ^^^^^^^^^^^^^^^^^^^^^^
185-
186- error: aborting due to 21 previous errors
162+ error: aborting due to 19 previous errors
187163
0 commit comments