Skip to content
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

Fix overriding editions and similar custom flags #275

Merged
merged 1 commit into from
Sep 9, 2024
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
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

### Removed

## [0.26.4] - 2024-09-09

### Added

### Fixed

* custom flags were not overriding the default, but the other way around.

### Changed

* Made more code public for miri to use
* Replaced `lazy_static` with std's `OnceLock`

Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ui_test"
version = "0.26.3"
version = "0.26.4"
edition = "2021"
license = "MIT OR Apache-2.0"
description = "A test framework for testing rustc diagnostics output"
Expand Down
2 changes: 1 addition & 1 deletion src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ impl CommentParser<Comments> {
}

for (k, v) in base.custom {
custom.entry(k).or_insert(v);
custom.insert(k, v);
}

*self.base() = defaults;
Expand Down
2 changes: 1 addition & 1 deletion tests/integrations/basic-bin/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/integrations/basic-fail-mode/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/integrations/basic-fail/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion tests/integrations/basic-fail/Cargo.stdout
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,7 @@ Building aux file tests/actual_tests_bless/auxiliary/the_proc_macro.rs ... ok
tests/actual_tests_bless/aux_proc_macro_no_main.rs ... FAILED
tests/actual_tests_bless/compile_flags_quotes.rs ... FAILED
tests/actual_tests_bless/compiletest-rs-command.rs ... FAILED
tests/actual_tests_bless/edition_override.rs ... ok
tests/actual_tests_bless/failing_executable.rs ... ok
tests/actual_tests_bless/failing_executable.rs (revision `run`) ... FAILED
Building aux file tests/actual_tests_bless/auxiliary/foomp.rs ... ok
Expand Down Expand Up @@ -1079,7 +1080,7 @@ FAILURES:
tests/actual_tests_bless/unknown_revision2.rs
tests/actual_tests_bless/wrong_diagnostic_code.rs

test result: FAIL. 23 failed; 25 passed; 3 ignored
test result: FAIL. 23 failed; 26 passed; 3 ignored

Building dependencies ... ok
tests/actual_tests_bless_yolo/revisions_bad.rs (revision `foo`) ... ok
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
//@edition: 2018
//@check-pass

fn main() {
match 42 {
0...1 => {}
_ => {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
warning: `...` range patterns are deprecated
--> tests/actual_tests_bless/edition_override.rs:6:10
|
6 | 0...1 => {}
| ^^^ help: use `..=` for an inclusive range
|
= warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021!
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
= note: `#[warn(ellipsis_inclusive_range_patterns)]` on by default

warning: 1 warning emitted

2 changes: 1 addition & 1 deletion tests/integrations/basic/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/integrations/cargo-run/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/integrations/dep-fail/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/integrations/ui_test_dep_bug/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.