about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2022-07-29Auto merge of #99467 - BelovDV:add_option_link_arg, r=petrochenkovbors-8/+67
flag '-l link-arg=___ was added #99427
2022-07-29Add diagnostic when using public instead of pubGimgim-0/+29
2022-07-29Auto merge of #99715 - tmiasko:coverage-run-make, r=Mark-Simulacrumbors-11/+11
Move coverage tests from run-make-fulldeps to run-make
2022-07-29Add ui test for #99625Obei Sideg-0/+34
2022-07-29Auto merge of #99892 - JohnTitor:rollup-qi4fem8, r=JohnTitorbors-0/+56
Rollup of 8 pull requests Successful merges: - #99686 (add suggestion when there is a impl of external trait on pointer with wrong coherence rules) - #99760 (doc/rustc: describe the uefi target platforms) - #99766 (Htmldocck: Substitute the doc channel when blessing) - #99781 (Use String::from_utf8_lossy in CStr demo) - #99803 (Update mentions to `rustc_metadata::rmeta::Lazy`) - #99845 (Remove `$` prefix for bash scripts in doc) - #99850 (rustdoc: Remove more Clean trait implementations) - #99872 (Clone the `src/llvm-project` submodule if profiling is enabled) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-07-29dont call type ascription 'cast'Michael Goulet-73/+73
2022-07-29Rollup merge of #99686 - vincenzopalazzo:macros/impl_on_ptr, r=compiler-errorsYuki Okushi-0/+56
add suggestion when there is a impl of external trait on pointer with wrong coherence rules Closes https://github.com/rust-lang/rust/issues/99572 This will try to improve the node in the error message by suggesting a general solution because the solution, in this case, is application depended. I'm not super happy regarding the code quality, but I'm happy to have feedback on it. `@rustbot` r? `@compiler-errors`
2022-07-29Adjust an expr span to account for macrosMichael Goulet-1/+17
2022-07-29Do not allow bad projection term to leak into the type checkerMichael Goulet-6/+41
2022-07-29check if T is sliceTakayuki Maeda-1/+1
fix msg
2022-07-29Auto merge of #99660 - PrestonFrom:issue_99265, r=compiler-errorsbors-24/+864
Generate correct suggestion with named arguments used positionally Address issue #99265 by checking each positionally used argument to see if the argument is named and adding a lint to use the name instead. This way, when named arguments are used positionally in a different order than their argument order, the suggested lint is correct. For example: ``` println!("{b} {}", a=1, b=2); ``` This will now generate the suggestion: ``` println!("{b} {a}", a=1, b=2); ``` Additionally, this check now also correctly replaces or inserts only where the positional argument is (or would be if implicit). Also, width and precision are replaced with their argument names when they exists. Since the issues were so closely related, this fix for issue #99265 also fixes issue #99266. Fixes #99265 Fixes #99266
2022-07-29Auto merge of #99512 - nikic:llvm-15-fixes, r=cuviperbors-22/+14
LLVM 15 compatibility fixes These are LLVM 15 compatibility fixes split out from #99464. There are three changes here: * Emit elementtype attribtue for ldrex/strex intrinsics. This is requires as part of the opaque pointers migration. * Make more tests compatible with opaque pointers. These are either new or aren't run on x86. * Remove a test for `#[rustc_allocator]`. Since #99574 there are more requirement on the function signature. I dropped the test entirely, since we already test the effect of the attribute elsewhere. * The main change: When a worker thread emits an error, wait for other threads to finish before unwinding the main thread and exiting. Otherwise workers may end up using globals for which destructors have already been run. This was probably never quite correct, but became an active problem with LLVM 15, because it started using global dtors in critical places, as part of ManagedStatic removal. Fixes #99432 (and probably also #95679). r? `@cuviper`
2022-07-29fix ICE when computing codegen_fn_attrs on closure with non-fn parentMichael Goulet-0/+9
2022-07-28Remove guess_head_span.Camille GILLOT-56/+65
2022-07-28rustdoc: align invalid-html-tags lint with commonmark specMichael Howell-1/+19
2022-07-28Auto merge of #99863 - Dylan-DPC:rollup-lq9w047, r=Dylan-DPCbors-22/+141
Rollup of 6 pull requests Successful merges: - #99628 (add more docs regarding ideographic numbers) - #99689 (Revert `write!` and `writeln!` to late drop temporaries) - #99807 (Fix PermissionDenied UI tests on WSL) - #99817 (rustdoc: remove Clean trait impls for more items) - #99851 (Fix small typo in Cargo.toml comment) - #99856 (fix: remove fake no_dead_strip for osx) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-07-28location-detail: disable all location details when passed `none`Hudson Ayers-1/+11
Prior to this fix, `-Z location-detail` provided no mechanism for disabling all location details. This commit also adds a test case to verify that this option continues to work as intended, and clarifies the documentation of this option.
2022-07-28Rollup merge of #99807 - Nilstrieb:wsl-ui-test-fix, r=Mark-SimulacrumDylan DPC-6/+11
Fix PermissionDenied UI tests on WSL On my WSL with `appendWindowsPath=true`, running an invalid command returns `PermissionDenied` instead of `NotFound`, causing two UI tests to fail.
2022-07-28Rollup merge of #99689 - dtolnay:write, r=Mark-SimulacrumDylan DPC-16/+130
Revert `write!` and `writeln!` to late drop temporaries Closes (on master, but not on beta) #99684 by reverting the `write!` and `writeln!` parts of #96455. argument position | before<br>#94868 | after<br>#94868 | after<br>#96455 | after<br>this PR | desired<br>(unimplementable) --- |:---:|:---:|:---:|:---:|:---: `write!($tmp, "…", …)` | **⸺late** | **⸺late** | *early⸺* | **⸺late** | **⸺late** `write!(…, "…", $tmp)` | **⸺late** | **⸺late** | *early⸺* | **⸺late** | *early⸺* `writeln!($tmp, "…", …)` | **⸺late** | **⸺late** | *early⸺* | **⸺late** | **⸺late** `writeln!(…, "…", $tmp)` | **⸺late** | **⸺late** | *early⸺* | **⸺late** | *early⸺* `print!("…", $tmp)` | **⸺late** | **⸺late** | *early⸺* | *early⸺* | *early⸺* `println!("…", $tmp)` | *early⸺* | **⸺late** | *early⸺* | *early⸺* | *early⸺* `eprint!("…", $tmp)` | **⸺late** | **⸺late** | *early⸺* | *early⸺* | *early⸺* `eprintln!("…", $tmp)` | *early⸺* | **⸺late**| *early⸺* | *early⸺* | *early⸺* `panic!("…", $tmp)` | *early⸺* | *early⸺* | *early⸺* | *early⸺* | *early⸺* "Late drop" refers to dropping temporaries at the nearest semicolon **outside** of the macro invocation. "Early drop" refers to dropping temporaries inside of the macro invocation.
2022-07-28Auto merge of #99780 - Nilstrieb:mir-opt-test-line-no, r=oli-obkbors-9912/+9913
Use line numbers relative to the function in mir-opt tests As shown in #99770, the line numbers can be a big source of needless and confusing diffs. This PR adds a new flag `-Zmir-pretty-relative-line-numbers` to make them relative to the function declaration, which avoids most needless diffs from attribute changes. `@JakobDegen` told me that there has been a zulip conversation about disabling line numbers with mixed opinions, so I'd like to get some feedback here, for this hopefully better solution. r? rust-lang/wg-mir-opt
2022-07-28--bless testsMaybe Waffle-63/+119
2022-07-28orphan check: remove const generics fixmelcnr-0/+29
2022-07-28Revert "Rollup merge of #97346 - JohnTitor:remove-back-compat-hacks, r=oli-obk"Oli Scherer-57/+47
This reverts commit c703d11dccb4a895c7aead3b2fcd8cea8c483184, reversing changes made to 64eb9ab869bc3f9ef3645302fbf22e706eea16cf.
2022-07-28anonymize all bound vars, not just regionslcnr-0/+14
2022-07-28Diagnose missing make includesTomasz Miąsko-4/+4
2022-07-28Move coverage tests from run-make-fulldeps to run-makeTomasz Miąsko-4/+4
2022-07-28bless mir opt testsNilstrieb-9912/+9912
2022-07-28Rollup merge of #99810 - GuillaumeGomez:fix-settings-slider-small-width, ↵Dylan DPC-0/+9
r=notriddle Fix settings slider on small width screens Fixes #99794. Screenshot of the fix: ![Screenshot from 2022-07-27 14-17-08](https://user-images.githubusercontent.com/3050060/181250007-55f982d1-89db-45b7-a4f1-0d1729e6a3e3.png) cc `````@jsha````` r? `````@notriddle`````
2022-07-28Rollup merge of #99714 - ouz-a:issue_57961, r=oli-obkDylan DPC-1/+18
Fix regression introduced with #99383 Fixes #99642
2022-07-28Use line numbers relative to function in mir opt testsNilstrieb-0/+1
This adds a new option, `-Zmir-pretty-relative-line-numbers`, that is then used in compiletest for the mir-opt tests.
2022-07-28suggest adding/removing `ref` for binding patternsTakayuki Maeda-2/+111
2022-07-27add suggestion when there is a impl of external trait on pointerVincenzo Palazzo-0/+56
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2022-07-27safe transmute: reference tracking issueJack Wrenn-1/+14
ref: https://github.com/rust-lang/rust/pull/92268#discussion_r925266769
2022-07-27safe transmute: add `rustc_on_unimplemented` to `BikeshedIntrinsicFrom`Jack Wrenn-364/+482
ref: https://github.com/rust-lang/rust/pull/92268#discussion_r925266583
2022-07-27safe transmute: test to ensure that trait is correctly feature-gatedJack Wrenn-0/+17
ref: https://github.com/rust-lang/rust/pull/92268#discussion_r925265476
2022-07-27safe transmute: test when `ASSUME` params are passed indirectlyJack Wrenn-0/+73
ref: https://github.com/rust-lang/rust/pull/92268/files#r925258420
2022-07-27safe transmute: gracefully handle const params of wrong typesJack Wrenn-0/+67
ref: https://github.com/rust-lang/rust/pull/92268/files#r925244819
2022-07-27Initial (incomplete) implementation of transmutability trait.Jack Wrenn-0/+3840
This initial implementation handles transmutations between types with specified layouts, except when references are involved. Co-authored-by: Igor null <m1el.2027@gmail.com>
2022-07-27Rollup merge of #99812 - GuillaumeGomez:fix-headings-colors, r=jsha,notriddleGuillaume Gomez-5/+103
Fix headings colors Fixes #99797. ![image](https://user-images.githubusercontent.com/3050060/181260966-49faf9d3-f6b8-4de4-bc7d-ed9f0467cf68.png) cc `@jsha` r? `@notriddle`
2022-07-27Rollup merge of #99728 - cjgillot:ast-lifetimes-anon-clean, r=petrochenkovGuillaume Gomez-0/+24
Clean up HIR-based lifetime resolution Based on https://github.com/rust-lang/rust/pull/97313. Fixes #98932. r? `@petrochenkov`
2022-07-27Rollup merge of #99710 - davidtwco:internal-lint-opts, r=lcnrGuillaume Gomez-0/+42
lint: add bad opt access internal lint Prompted by [Zulip discussion](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/sess.2Ecrate_types.28.29.20vs.20sess.2Eopts.2Ecrate_types/near/290682847). Some command-line options accessible through `sess.opts` are best accessed through wrapper functions on `Session`, `TyCtxt` or otherwise, rather than through field access on the option struct in the `Session`. Adds a new lint which triggers on those options that should be accessed through a wrapper function so that this is prohibited. Options are annotated with a new attribute `rustc_lint_opt_deny_field_access` which can specify the error message (i.e. "use this other function instead") to be emitted. A simpler alternative would be to simply rename the options in the option type so that it is clear they should not be used, however this doesn't prevent uses, just discourages them. Another alternative would be to make the option fields private, and adding accessor functions on the option types, however the wrapper functions sometimes rely on additional state from `Session` or `TyCtxt` which wouldn't be available in an function on the option type, so the accessor would simply make the field available and its use would be discouraged too. **Leave a comment if there's an option I should add this to.**
2022-07-27Rollup merge of #99651 - compiler-errors:fn-and-raw-ptr-in-const-generics, ↵Guillaume Gomez-17/+71
r=oli-obk Deeply deny fn and raw ptrs in const generics I think this is right -- just because we wrap a fn ptr in a wrapper type does not mean we should allow it in a const parameter. We now reject both of these in the same way: ``` #![feature(adt_const_params)] #[derive(Eq, PartialEq)] struct Wrapper(); fn foo<const W: Wrapper>() {} fn foo2<const F: fn()>() {} ``` This does regress one test (`src/test/ui/consts/refs_check_const_eq-issue-88384.stderr`), but I'm not sure it should've passed in the first place. cc: ``@b-naber`` who introduced that test^ fixes #99641
2022-07-27Rollup merge of #99358 - compiler-errors:issue-99325, r=oli-obkGuillaume Gomez-0/+307
Allow `ValTree::try_to_raw_bytes` on `u8` array Fixes #99325 cc `@b-naber` I think who touched this last in 705d818bd52a6324d5e7693cc4306457395eebc8
2022-07-27Add GUI tests for headings border and text colorGuillaume Gomez-5/+103
2022-07-27Make CFI tests opaque pointers compatibleNikita Popov-7/+6
2022-07-27Remove outdated rustc_allocator testNikita Popov-7/+0
This attribute now does more than just place noalias on the return, and has specific requirements for the signature. Drop the test entirely, as we already check __rust_alloc attributes in other codegen tests.
2022-07-27Update codegen test for opaque pointersNikita Popov-8/+8
2022-07-27Fix linkage-attr/issue-10755.rs ui test on WSLNilstrieb-1/+4
It checked for a "not found", but on WSL with appendWindowsPath=true, PermissionDenied is the error instead.
2022-07-27Add GUI test for item info positionGuillaume Gomez-8/+35
2022-07-27Add GUI test for settings in small deviceGuillaume Gomez-0/+9