Skip to content

Update tests for 1.71 #508

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions rust/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -1069,6 +1069,8 @@ def find_span_r(span, expansion=None):
not _is_external(window, span['file_name']) and \
not span['expansion']['macro_decl_name'].startswith('#['):
invoke_span, expansion = find_span_r(span)
# TODO: rustc now emits this in its text output in some cases.
# Consider trying to avoid the duplicate note.
add_additional(window, invoke_span, 'in this macro invocation', 'help')

if span['is_primary']:
Expand Down
1 change: 0 additions & 1 deletion rust/themes.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,6 @@ def add_fake(msg, text):
}

def see_also(path):
print(path)
if path.endswith(':external'):
return 'See Also (external):'
else:
Expand Down
2 changes: 1 addition & 1 deletion tests/error-tests/tests/macro-expansion-inside-1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ mod macro_expansion_inside_mod1;
/*BEGIN*/example_bad_syntax!{}/*END*/
// ~HELP(>=1.20.0) in this macro invocation
// ~HELP(>=1.20.0,<1.34.0-beta) in this macro invocation
// ~MSG(>=1.20.0) See Primary: macro_expansion_inside_mod1.rs:7
// ~MSG(>=1.20.0) See Primary: macro_expansion_inside_mod1.rs:8
// ~MSG(>=1.20.0,<1.34.0-beta) See Primary: macro_expansion_inside_mod1.rs:7
1 change: 1 addition & 0 deletions tests/error-tests/tests/macro-expansion-outside-1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ extern crate dcrate;

/*BEGIN*/example_bad_syntax!{}/*END*/
// ^^^^^^^^^^^^^^^^^^^^^HELP(>=1.44.0-beta) in this macro invocation
// ^^^^^^^^^^^^^^^^^^^^^ERR(>=1.71.0-beta) in this macro invocation
// ^^^^^^^^^^^^^^^^^^^^^MSG(>=1.44.0-beta) See Primary: lib.rs:20
// ~ERR(>=1.20.0,<1.44.0-beta) /expected one of .*, found `:`/
// ~ERR(>=1.20.0,<1.44.0-beta) this error originates in a macro outside of the current crate
Expand Down
2 changes: 2 additions & 0 deletions tests/error-tests/tests/macro_expansion_inside_mod1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
macro_rules! example_bad_syntax {
() => {
enum E {
// ^ERR(>=1.71.0-beta) while parsing this enum
// This is somewhat of an odd example, since rustc gives two
// syntax errors.
Kind(x: u32)
Expand All @@ -12,6 +13,7 @@ macro_rules! example_bad_syntax {
// ^ERR(<1.34.0-beta) /expected one of .*, found `:`/
// ^ERR(>=1.18.0,<1.34.0-beta) expected one of
// ^MSG(>=1.20.0,<1.34.0-beta) See Also: macro-expansion-inside-1.rs:6
// ^HELP(>=1.71.0-beta) enum variants can be
}
}
}