Skip to content

Commit 697c3dd

Browse files
committed
Minor message updates for 1.35/1.36.
1 parent 01e693a commit 697c3dd

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

rust/levels.py

+4
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ def __repr__(self):
4141
'warning': Level(1, 'warning', 'warnings'),
4242
'note': Level(2, 'note', 'notes'),
4343
'help': Level(3, 'help', 'help'),
44+
# This is "FailureNote", see https://github.com/rust-lang/rust/issues/60425.
45+
# Currently we filter all these out ("For more information..."), but
46+
# handle it just in case new ones are added.
47+
'': Level(4, 'note', 'note'),
4448
}
4549

4650

rust/messages.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -837,9 +837,8 @@ def _collect_rust_messages(window, base_path, info, target_path,
837837
- `info`: The dictionary from Rust has the following structure:
838838
839839
- 'message': The message to display.
840-
- 'level': The error level ('error', 'warning', 'note', 'help')
841-
(XXX I think an ICE shows up as 'error: internal compiler
842-
error')
840+
- 'level': The error level ('error', 'warning', 'note', 'help', ''
841+
(for FailureNote), 'error: internal compiler error')
843842
- 'code': If not None, contains a dictionary of extra information
844843
about the error.
845844
- 'code': String like 'E0001'
@@ -964,6 +963,7 @@ def add_additional(span, text, level, suggested_replacement=None):
964963
if not (imsg.startswith('aborting due to') or
965964
imsg.startswith('cannot continue') or
966965
imsg.startswith('Some errors occurred') or
966+
imsg.startswith('Some errors have detailed') or
967967
imsg.startswith('For more information about')):
968968
if target_path:
969969
# Display at the bottom of the root path (like main.rs)

tests/error-tests/benches/bench_err.rs

+1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@
55
// ^^^^^^^ERR(<1.30.0-beta) The attribute `asdf` is currently unknown
66
// ^^^^ERR(>=1.30.0-beta) The attribute `asdf` is currently unknown
77
// ^^^^HELP(nightly) add #![feature(custom_attribute)]
8+
// ^^^^NOTE(>=1.36.0-beta) for more information
89
fn f() {}

0 commit comments

Comments
 (0)