about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-05-08 15:00:30 +0000
committerbors <bors@rust-lang.org>2022-05-08 15:00:30 +0000
commit4667198d4f6a0fd4c2cccd0ddec4e5afbe291401 (patch)
treee0deb4a19ca2bee054e23f3dc52fb922b5acc62b /compiler/rustc_codegen_llvm/src
parent9c78883fdf5ccdeef833bc99095a18dcf6312d0b (diff)
parent597f61bbe3a861c3d77b784cc701e6a975fbe842 (diff)
downloadrust-4667198d4f6a0fd4c2cccd0ddec4e5afbe291401.tar.gz
rust-4667198d4f6a0fd4c2cccd0ddec4e5afbe291401.zip
Auto merge of #8802 - smoelius:allow-expect-unwrap-in-tests, r=llogiq
Optionally allow `expect` and `unwrap` in tests

This addresses #1015, except it makes the new behavior optional.

The reason for the msrv-related changes is as follows.

Rather than expand `check_methods` list of arguments, it seemed easier to make `check_methods` a method of `Methods`, so that `check_methods` could access `Methods`' fields.

`check_methods` had an `msrv` parameter, which I consequently made a field of `Methods`. But, to avoid adding a lifetime parameter to `Methods`, I made the field type `Option<RustcVersion>` instead of the parameter's existing type, `Option<&RustcVersion>`. This seemed sensible since `RustcVersion` implements `Copy`. But this broke a lot of code that expected an `Option<&RustcVersion>` or `&Option<RustcVersion>`. I changed all of those occurrences to `Option<RustcVersion>`. IMHO, the code is better as a result of these changes, though.

The msrv-related changes are in their own commit to (hopefully) ease review.

Closes #1015

changelog: optionally allow `expect` and `unwrap` in tests

r? `@llogiq`
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions