Skip to content

Commit 9f9183d

Browse files
committed
Fix rebase
1 parent 7ba5fd1 commit 9f9183d

39 files changed

+243
-240
lines changed

src/librustc/session/mod.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -909,13 +909,14 @@ pub fn build_session_with_codemap(sopts: config::Options,
909909

910910
let emitter: Box<Emitter> = match (sopts.error_format, emitter_dest) {
911911
(config::ErrorOutputType::HumanReadable(color_config), None) => {
912-
Box::new(EmitterWriter::stderr(color_config,
913-
Some(codemap.clone()),
914-
false,
915-
sopts.debugging_opts.teach))
912+
Box::new(EmitterWriter::stderr(color_config, Some(codemap.clone()),
913+
false, sopts.debugging_opts.teach)
914+
.ui_testing(sopts.debugging_opts.ui_testing))
916915
}
917916
(config::ErrorOutputType::HumanReadable(_), Some(dst)) => {
918-
Box::new(EmitterWriter::new(dst, Some(codemap.clone()), false, false))
917+
Box::new(EmitterWriter::new(dst, Some(codemap.clone()),
918+
false, false)
919+
.ui_testing(sopts.debugging_opts.ui_testing))
919920
}
920921
(config::ErrorOutputType::Json(pretty), None) => {
921922
Box::new(JsonEmitter::stderr(Some(registry), codemap.clone(),

src/librustc_errors/emitter.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,9 @@ impl EmitterWriter {
189189
}
190190
}
191191

192-
pub fn ui_testing(self, ui_testing: bool) -> Self {
193-
Self { ui_testing, ..self }
192+
pub fn ui_testing(mut self, ui_testing: bool) -> Self {
193+
self.ui_testing = ui_testing;
194+
self
194195
}
195196

196197
fn maybe_anonymized(&self, line_num: usize) -> String {

src/test/ui-fulldeps/proc-macro/load-panic.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
error: proc-macro derive panicked
22
--> $DIR/load-panic.rs:17:10
33
|
4-
17 | #[derive(A)]
4+
LL | #[derive(A)]
55
| ^
66
|
77
= help: message: nope!

src/test/ui/command-line-diagnostics.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
error[E0384]: cannot assign twice to immutable variable `x`
22
--> $DIR/command-line-diagnostics.rs:16:5
33
|
4-
15 | let x = 42;
4+
LL | let x = 42;
55
| - first assignment to `x`
6-
16 | x = 43;
6+
LL | x = 43;
77
| ^^^^^^ cannot assign twice to immutable variable
88

99
error: aborting due to previous error

src/test/ui/did_you_mean/issue-42599_available_fields_note.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
error[E0560]: struct `submodule::Demo` has no field named `inocently_mispellable`
22
--> $DIR/issue-42599_available_fields_note.rs:26:39
33
|
4-
26 | Self { secret_integer: 2, inocently_mispellable: () }
4+
LL | Self { secret_integer: 2, inocently_mispellable: () }
55
| ^^^^^^^^^^^^^^^^^^^^^ field does not exist - did you mean `innocently_misspellable`?
66

77
error[E0560]: struct `submodule::Demo` has no field named `egregiously_nonexistent_field`
88
--> $DIR/issue-42599_available_fields_note.rs:31:39
99
|
10-
31 | Self { secret_integer: 3, egregiously_nonexistent_field: () }
10+
LL | Self { secret_integer: 3, egregiously_nonexistent_field: () }
1111
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `submodule::Demo` does not have this field
1212
|
1313
= note: available fields are: `favorite_integer`, `secret_integer`, `innocently_misspellable`, `another_field`, `yet_another_field` ... and 2 others

src/test/ui/error-codes/E0062.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ error[E0062]: field `x` specified more than once
33
|
44
LL | x: 0,
55
| ---- first use of `x`
6-
18 | x: 0,
6+
LL | x: 0,
77
| ^ used more than once
88

99
error: aborting due to previous error

src/test/ui/error-codes/E0559.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
error[E0559]: variant `Field::Fool` has no field named `joke`
22
--> $DIR/E0559.rs:16:27
33
|
4-
16 | let s = Field::Fool { joke: 0 };
4+
LL | let s = Field::Fool { joke: 0 };
55
| ^^^^ `Field::Fool` does not have this field
66
|
77
= note: available fields are: `x`

src/test/ui/error-codes/E0560.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
error[E0560]: struct `Simba` has no field named `father`
22
--> $DIR/E0560.rs:16:32
33
|
4-
16 | let s = Simba { mother: 1, father: 0 };
4+
LL | let s = Simba { mother: 1, father: 0 };
55
| ^^^^^^ `Simba` does not have this field
66
|
77
= note: available fields are: `mother`

src/test/ui/error-codes/E0657.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
error[E0657]: `impl Trait` can only capture lifetimes bound at the fn or impl level
22
--> $DIR/E0657.rs:20:31
33
|
4-
LL | -> impl for<'a> Id<impl Lt<'a>>
5-
| ^^
4+
LL | -> Box<for<'a> Id<impl Lt<'a>>>
5+
| ^^
66

77
error[E0657]: `impl Trait` can only capture lifetimes bound at the fn or impl level
88
--> $DIR/E0657.rs:29:35
99
|
10-
LL | -> impl for<'a> Id<impl Lt<'a>>
11-
| ^^
10+
LL | -> Box<for<'a> Id<impl Lt<'a>>>
11+
| ^^
1212

1313
error: aborting due to 2 previous errors
1414

src/test/ui/error-festival.stderr

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,73 @@
11
error[E0425]: cannot find value `y` in this scope
22
--> $DIR/error-festival.rs:24:5
33
|
4-
24 | y = 2;
4+
LL | y = 2;
55
| ^ did you mean `x`?
66

77
error[E0603]: constant `FOO` is private
88
--> $DIR/error-festival.rs:32:5
99
|
10-
32 | foo::FOO;
10+
LL | foo::FOO;
1111
| ^^^^^^^^
1212

1313
error[E0368]: binary assignment operation `+=` cannot be applied to type `&str`
1414
--> $DIR/error-festival.rs:22:5
1515
|
16-
22 | x += 2;
16+
LL | x += 2;
1717
| -^^^^^
1818
| |
1919
| cannot use `+=` on type `&str`
2020

2121
error[E0599]: no method named `z` found for type `&str` in the current scope
2222
--> $DIR/error-festival.rs:26:7
2323
|
24-
26 | x.z();
24+
LL | x.z();
2525
| ^
2626

2727
error[E0600]: cannot apply unary operator `!` to type `Question`
2828
--> $DIR/error-festival.rs:29:5
2929
|
30-
29 | !Question::Yes;
30+
LL | !Question::Yes;
3131
| ^^^^^^^^^^^^^^
3232

3333
error[E0604]: only `u8` can be cast as `char`, not `u32`
3434
--> $DIR/error-festival.rs:35:5
3535
|
36-
35 | 0u32 as char;
36+
LL | 0u32 as char;
3737
| ^^^^^^^^^^^^
3838

3939
error[E0605]: non-primitive cast: `u8` as `std::vec::Vec<u8>`
4040
--> $DIR/error-festival.rs:39:5
4141
|
42-
39 | x as Vec<u8>;
42+
LL | x as Vec<u8>;
4343
| ^^^^^^^^^^^^
4444
|
4545
= note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait
4646

4747
error[E0054]: cannot cast as `bool`
4848
--> $DIR/error-festival.rs:43:24
4949
|
50-
43 | let x_is_nonzero = x as bool;
50+
LL | let x_is_nonzero = x as bool;
5151
| ^^^^^^^^^ unsupported cast
5252
|
5353
= help: compare with zero instead
5454

5555
error[E0606]: casting `&u8` as `u32` is invalid
5656
--> $DIR/error-festival.rs:47:18
5757
|
58-
47 | let y: u32 = x as u32;
58+
LL | let y: u32 = x as u32;
5959
| ^^^^^^^^ cannot cast `&u8` as `u32`
6060
|
6161
help: did you mean `*x`?
6262
--> $DIR/error-festival.rs:47:18
6363
|
64-
47 | let y: u32 = x as u32;
64+
LL | let y: u32 = x as u32;
6565
| ^
6666

6767
error[E0607]: cannot cast thin pointer `*const u8` to fat pointer `*const [u8]`
6868
--> $DIR/error-festival.rs:51:5
6969
|
70-
51 | v as *const [u8];
70+
LL | v as *const [u8];
7171
| ^^^^^^^^^^^^^^^^
7272

7373
error: aborting due to 10 previous errors

0 commit comments

Comments
 (0)