about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2022-08-21Rework ambiguity errorsMichael Goulet-142/+47
2022-08-21Note closure kind mismatch causeMichael Goulet-8/+78
2022-08-21Revert closure mismatch spansMichael Goulet-133/+85
2022-08-21Do not favor projection type when pointing out arg causing fulfillment errorMichael Goulet-13/+13
2022-08-21Skip mentioning lang itemMichael Goulet-8/+3
2022-08-21Account for relative pathsMichael Goulet-53/+100
2022-08-21Rework point-at-argMichael Goulet-519/+1003
2022-08-21Do not use void pointer for `ptr_mask` intrinsicMaybe Waffle-2/+2
I couldn't find where exactly it's documented, but apperantly pointers to void type are invalid in llvm - void is only allowed as a return type of functions.
2022-08-21make `ptr_mask` codegen test more specificMaybe Waffle-1/+5
2022-08-21Add codegen test for `intinsics::ptr_mask`Maybe Waffle-0/+7
2022-08-20Allow other directives before the `ret`scottmcm-1/+1
2022-08-20Auto merge of #100810 - matthiaskrgr:rollup-xep778s, r=matthiaskrgrbors-26/+351
Rollup of 9 pull requests Successful merges: - #97963 (net listen backlog set to negative on Linux.) - #99935 (Reenable disabled early syntax gates as future-incompatibility lints) - #100129 (add miri-test-libstd support to libstd) - #100500 (Ban references to `Self` in trait object substs for projection predicates too.) - #100636 (Revert "Revert "Allow dynamic linking for iOS/tvOS targets."") - #100718 ([rustdoc] Fix item info display) - #100769 (Suggest adding a reference to a trait assoc item) - #100777 (elaborate how revisions work with FileCheck stuff in src/test/codegen) - #100796 (Refactor: remove unnecessary string searchings) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-08-20Rollup merge of #100796 - TaKO8Ki:remove-unnecessary-string-searching, ↵Matthias Krüger-12/+18
r=compiler-errors Refactor: remove unnecessary string searchings This patch removes unnecessary string searchings for checking if function arguments have `&` and `&mut`.
2022-08-20Rollup merge of #100777 - pnkfelix:expand-codegen-tests-readme, r=TaKO8KiMatthias Krüger-0/+22
elaborate how revisions work with FileCheck stuff in src/test/codegen elaborate how revisions work with FileCheck stuff in src/test/codegen
2022-08-20Rollup merge of #100769 - ↵Matthias Krüger-0/+55
TaKO8Ki:suggest-adding-reference-to-trait-assoc-item, r=cjgillot Suggest adding a reference to a trait assoc item fixes #100289
2022-08-20Rollup merge of #100718 - GuillaumeGomez:fix-item-info, r=jshaMatthias Krüger-5/+9
[rustdoc] Fix item info display Fixes #100369. The solution I came up with was simply to wrap the "text part" of the `item-info` into another span so that `flex` wouldn't mess with it. Live demo is [here](https://rustdoc.crud.net/imperio/fix-item-info/foo/struct.ItemInfo.html). r? ``@jsha``
2022-08-20Rollup merge of #100500 - cjgillot:verify-self-predicate, r=lcnrMatthias Krüger-1/+31
Ban references to `Self` in trait object substs for projection predicates too. Fixes https://github.com/rust-lang/rust/issues/100484 Fixes https://github.com/rust-lang/rust/issues/100485 r? ````@lcnr````
2022-08-20Rollup merge of #99935 - CAD97:unstable-syntax-lints, r=petrochenkovMatthias Krüger-8/+216
Reenable disabled early syntax gates as future-incompatibility lints - MCP: https://github.com/rust-lang/compiler-team/issues/535 The approach taken by this PR is - Introduce a new lint, `unstable_syntax_pre_expansion`, and reenable the early syntax gates to emit it - Use the diagnostic stashing mechanism to stash warnings the early warnings - When the hard error occurs post expansion, steal and cancel the early warning - Don't display any stashed warnings if errors are present to avoid the same noise problem that hiding type ascription errors is avoiding Commits are working commits, but in a coherent steps-to-implement manner. Can be squashed if desired. The preexisting `soft_unstable` lint seems like it would've been a good fit, but it is deny-by-default (appropriate for `#[bench]`) and these gates should be introduced as warn-by-default. It may be desirable to change the stash mechanism's behavior to not flush lint errors in the presence of other errors either (like is done for warnings here), but upgrading a stash-using lint from warn to error perhaps is enough of a request to see the lint that they shouldn't be hidden; additionally, fixing the last error to get new errors thrown at you always feels bad, so if we know the lint errors are present, we should show them. Using a new flag/mechanism for a "weak diagnostic" which is suppressed by other errors may also be desirable over assuming any stashed warnings are "weak," but this is the first user of stashing warnings and seems an appropriate use of stashing (it follows the "know more later to refine the diagnostic" pattern; here we learn that it's in a compiled position) so we get to define what it means to stash a non-hard-error diagnostic. cc `````@petrochenkov````` (seconded MCP)
2022-08-20Rollup merge of #100693 - scottmcm:new-llvm15-nops, r=Mark-SimulacrumMatthias Krüger-0/+54
Add LLVM15-specific codegen test for `try`/`?`s that now optimize away These still generated a bunch of code back in Rust 1.63 (<https://rust.godbolt.org/z/z31P8h6rz>), but with LLVM 15 merged they no longer do 🎉
2022-08-20Rollup merge of #100691 - compiler-errors:issue-100690, r=estebankMatthias Krüger-0/+67
Make `same_type_modulo_infer` a proper `TypeRelation` Specifically, this fixes #100690 because we no longer consider a `ReLateBound` and a `ReVar` to be equal. `ReVar` can only be equal to free regions or static.
2022-08-20Rollup merge of #100596 - TaKO8Ki:remove-unnecessary-stderr-files, ↵Matthias Krüger-23/+0
r=Mark-Simulacrum Remove unnecessary stderr files This patch removes stderr files corresponding to revisions that have already been removed.
2022-08-20Extend GUI test for search results colorsGuillaume Gomez-0/+51
2022-08-20Update rustdoc testsGuillaume Gomez-4/+6
2022-08-20Auto merge of #100564 - nnethercote:box-ast-MacCall, r=spastorinobors-55/+55
Box the `MacCall` in various types. r? `@spastorino`
2022-08-20remove unnecessary string searchingsTakayuki Maeda-12/+18
remove unnecessary string searchings for checking if function arguments have `&` and `&mut`
2022-08-20Rollup merge of #100750 - ↵Matthias Krüger-0/+80
akabinds:akabinds/improved-invalid-function-qual-error, r=davidtwco improved diagnostic for function defined with `def`, `fun`, `func`, or `function` instead of `fn` Closes #99751
2022-08-20Rollup merge of #100617 - chenyukang:fix-100605, r=compiler-errorsMatthias Krüger-0/+55
Suggest the right help message for as_ref Fixes #100605
2022-08-20Rollup merge of #100507 - cameron1024:suggest-lazy, r=compiler-errorsMatthias Krüger-0/+9
suggest `once_cell::Lazy` for non-const statics Addresses https://github.com/rust-lang/rust/issues/100410 Some questions: - removing the `if` seems to include too many cases (e.g. calls to non-const functions inside a `const fn`), but this code excludes the following case: ```rust const FOO: Foo = non_const_fn(); ``` Should we suggest `once_cell` in this case as well? - The original issue mentions suggesting `AtomicI32` instead of `Mutex<i32>`, should this PR address that as well?
2022-08-20Rollup merge of #100186 - compiler-errors:or-as_mut, r=fee1-deadMatthias Krüger-76/+9
Mention `as_mut` alongside `as_ref` in borrowck error message Kinda fixes #99426 but I guess that really might be better staying open to see if we could make it suggest `as_mut` in a structured way. Not sure how to change borrowck to know that info tho.
2022-08-20Use separate infcx to solve obligations during negative coherenceMichael Goulet-2/+18
2022-08-20Suggest the right help message for as_refyukang-0/+55
2022-08-19elaborate how revisions work with FileCheck stuff in src/test/codegenFelix S. Klock II-0/+22
2022-08-19Update codegen tests to accommodate the potential presence/absence of theFelix S. Klock II-3/+48
extension operation depending on target architecture.
2022-08-19Auto merge of #100740 - Dylan-DPC:rollup-0td6yq4, r=Dylan-DPCbors-638/+699
Rollup of 9 pull requests Successful merges: - #99576 (Do not allow `Drop` impl on foreign fundamental types) - #100081 (never consider unsafe blocks unused if they would be required with deny(unsafe_op_in_unsafe_fn)) - #100208 (make NOP dyn casts not require anything about the vtable) - #100494 (Cleanup rustdoc themes) - #100522 (Only check the `DefId` for the recursion check in MIR inliner.) - #100592 (Manually implement Debug for ImportKind.) - #100598 (Don't fix builtin index when Where clause is found) - #100721 (Add diagnostics lints to `rustc_type_ir` module) - #100731 (rustdoc: count deref and non-deref as same set of used methods) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-08-20suggest adding a reference to a trait assoc itemTakayuki Maeda-0/+55
2022-08-19update test for LLVM changeKrasimir Georgiev-2/+2
LLVM commit https://github.com/llvm/llvm-project/commit/c2a38887932e3a46aa3bee35f3f5568ac68282f4 updates the PIC level version selection. This updates the rust tests to work under both the old and new behaviors. Detected by our experimental rust + llvm @ HEAD bot: https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/12829#0182b368-a405-47a2-b3da-9c79cb907bfe/701-709
2022-08-19Auto merge of #100209 - cjgillot:source-file-index, r=estebankbors-5/+5
Lazily decode SourceFile from metadata Currently, source files from foreign crates are decoded up-front from metadata. Spans from those crates were matched with the corresponding source using binary search among those files. This PR changes the strategy by matching spans to files during encoding. This allows to decode source files on-demand, instead of up-front. The on-disk format for spans becomes: `<tag> <position from start of file> <length> <file index> <crate (if foreign file)>`.
2022-08-19Update issue-83150.stderrouz-a-2/+2
2022-08-19Catch overflow earlyouz-a-8/+40
2022-08-19fix updated stderr outputsMatthew Kelly-1/+2
2022-08-19Add long description and test for E0311Matthew Kelly-0/+63
Adds a long description and unit test for the E0311 compiler error.
2022-08-19Rollup merge of #100731 - notriddle:notriddle/deref-methods-1, r=jshaDylan DPC-0/+30
rustdoc: count deref and non-deref as same set of used methods Fixes #100679
2022-08-19Rollup merge of #100598 - ouz-a:91633, r=compiler-errorsDylan DPC-0/+205
Don't fix builtin index when Where clause is found Where clause shadows blanket impl for `Index` which causes normalization to not occur, which causes ICE to happen when we typeck. r? `@compiler-errors` Fixes #91633
2022-08-19Rollup merge of #100522 - cjgillot:inline-polymorphic-recursion, r=tmiaskoDylan DPC-0/+25
Only check the `DefId` for the recursion check in MIR inliner. The current history check compares `Instance`s, so it cannot detect cases of polymorphic recursion where `Substs` change. This PR makes it so we only compare `DefId`s, ignoring any change in `Substs`. According to https://github.com/rust-lang/rust/pull/100522#issuecomment-1214769757, in practice only very few inlining decisions change. Fixes https://github.com/rust-lang/rust/issues/100476
2022-08-19Rollup merge of #100494 - GuillaumeGomez:cleanup-themes, r=jshaDylan DPC-6/+248
Cleanup rustdoc themes This PR continues our work to simplify the rustdoc themes by relying more on CSS variables. Interestingly enough, this time it allowed me to realize that we were having a lot of different colors for borders even though the difference is unnoticeable. I used this opportunity to unify them. The live demo is [here](https://rustdoc.crud.net/imperio/cleanup-themes/std/index.html). r? `@jsha`
2022-08-19Rollup merge of #100208 - RalfJung:dyn-upcast-nop, r=petrochenkovDylan DPC-20/+38
make NOP dyn casts not require anything about the vtable As suggested [on Zulip](https://rust-lang.zulipchat.com/#narrow/stream/144729-t-types/topic/dyn-upcasting.20stabilization/near/292151439). This matches what the codegen backends already do, and what Miri did do until https://github.com/rust-lang/rust/pull/99420 when I made it super extra paranoid.
2022-08-19Rollup merge of #100081 - RalfJung:unused-unsafe-in-unsafe-fn, r=jackh726Dylan DPC-599/+109
never consider unsafe blocks unused if they would be required with deny(unsafe_op_in_unsafe_fn) Judging from https://github.com/rust-lang/rust/issues/71668#issuecomment-1200317370 the consensus nowadays seems to be that we should never consider an unsafe block unused if it was required with `deny(unsafe_op_in_unsafe_fn)`, no matter whether that lint is actually enabled or not. So let's adjust rustc accordingly. The first commit does the change, the 2nd does some cleanup.
2022-08-19Rollup merge of #99576 - compiler-errors:foreign-fundamental-drop-is-bad, ↵Dylan DPC-13/+44
r=TaKO8Ki Do not allow `Drop` impl on foreign fundamental types `Drop` should not be implemented on `Pin<T>` even if `T` is local. This does not trigger regular orphan rules is because `Pin` is `#[fundamental]`... but we don't allow specialized `Drop` impls anyways, so these rules are not sufficient to prevent this impl on stable. Let's just choose even stricter rules, since we shouldn't be implementing `Drop` on a foreign ADT ever. Fixes #99575
2022-08-18rustdoc: count deref and non-deref as same set of used methodsMichael Howell-0/+30
2022-08-18added improved diagnostic for a function defined with an invalid qualifierakabinds-0/+80