about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2022-09-21FIX - adopt new Diagnostic naming in newly migrated modulesJhonny Bill Mena-6/+6
FIX - ambiguous Diagnostic link in docs UPDATE - rename diagnostic_items to IntoDiagnostic and AddToDiagnostic [Gardening] FIX - formatting via `x fmt` FIX - rebase conflicts. NOTE: Confirm wheather or not we want to handle TargetDataLayoutErrorsWrapper this way DELETE - unneeded allow attributes in Handler method FIX - broken test FIX - Rebase conflict UPDATE - rename residual _SessionDiagnostic and fix LintDiag link
2022-09-21UPDATE - rename SessionSubdiagnostic macro to SubdiagnosticJhonny Bill Mena-69/+69
Also renames: - sym::AddSubdiagnostic to sym:: Subdiagnostic - rustc_diagnostic_item = "AddSubdiagnostic" to rustc_diagnostic_item = "Subdiagnostic"
2022-09-21UPDATE - rename DiagnosticHandler macro to DiagnosticJhonny Bill Mena-87/+87
2022-09-21UPDATE - rename AddSubdiagnostic trait to AddToDiagnosticJhonny Bill Mena-9/+9
2022-09-21UPDATE - rename DiagnosticHandler trait to IntoDiagnosticJhonny Bill Mena-94/+95
2022-09-21UPDATE - move SessionDiagnostic from rustc_session to rustc_errorsJhonny Bill Mena-2/+1
2022-09-21Set 'exec-env:RUST_BACKTRACE=0' in const-eval-select testsAaron Hill-2/+4
This allows the tests to pass even if the user has RUST_BACKTRACE set when running 'x.py'
2022-09-21Make error messages great again (and fix clippy and add test)Deadbeef-42/+64
2022-09-21Add GUI test for `.stab` elements in docblocksGuillaume Gomez-0/+39
2022-09-21Rollup merge of #102059 - compiler-errors:issue-101984, r=jackh726Dylan DPC-0/+41
Use rebind instead of dummy binder in `SameTypeModuloInfer` relation Lazy binder usage (sorry, my fault) + assertion in `Binder::dummy` Fixes #101984
2022-09-21Rollup merge of #102045 - RalfJung:const-prop-regression-fix, r=oli-obkDylan DPC-0/+120
fix ConstProp handling of written_only_inside_own_block_locals Fixes a regression introduced by https://github.com/rust-lang/rust/pull/100239, which adds an early return and thus skips some code in `visit_terminator` that must be run for soundness. Fixes https://github.com/rust-lang/rust/issues/101973
2022-09-21Rollup merge of #102031 - andrewpollack:compiler-tests-backtrace, r=tmandryDylan DPC-4/+10
Adding ignore fuchsia tests for Backtrace, ErrorKind cases Tests where Backtrace parses are required (invalid since Fuchsia backtraces are not symbolized), and test where ErrorKind is not properly translated from a Fuchsia-style to Unix-style error code cc. ```@djkoloski``` r? ```@tmandry```
2022-09-21Rollup merge of #89891 - ojeda:modular-alloc, r=Mark-SimulacrumDylan DPC-0/+8
`alloc`: add unstable cfg features `no_rc` and `no_sync` In Rust for Linux we are using these to make `alloc` a bit more modular. See https://github.com/rust-lang/rust/pull/86048 and https://github.com/rust-lang/rust/pull/84266 for similar requests. Of course, the particular names are not important.
2022-09-21Improve diagnostic for adding more bounds to opaque typesOli Scherer-4/+6
2022-09-21Reproduce sad diagnosticOli Scherer-0/+35
2022-09-21Simplify insert_outlives_predicate opaque type logicOli Scherer-0/+8
2022-09-21Add regression testOli Scherer-0/+18
2022-09-21Also collect bounds from the ParamEnv for opaque typesOli Scherer-13/+2
2022-09-21Neither require nor imply lifetime bounds on opaque type for well formednessOli Scherer-29/+365
2022-09-21Auto merge of #101846 - chenyukang:fix-101793, r=davidtwcobors-22/+64
Fix the wording of help msg for bitwise not Fixes #101793
2022-09-21Auto merge of #100096 - compiler-errors:fn-return-must-be-sized, r=jackh726bors-1/+66
a fn pointer doesn't implement `Fn`/`FnMut`/`FnOnce` if its return type isn't sized I stumbled upon #83915 which hasn't received much attention recently, and I wanted to revive it since this is one existing soundness hole that seems pretty easy to fix. I'm not actually sure that the [alternative approach described here](https://github.com/rust-lang/rust/pull/83915#issuecomment-823643322) is sufficient, given the `src/test/ui/function-pointer/unsized-ret.rs` example I provided below. Rebasing the branch mentioned in that comment and testing that UI test, it seems that we actually end up only observing that `str: !Sized` during monomorphization, whereupon we ICE. Even if we were to fix that ICE, ideally we'd be raising an error that a fn pointer is being used badly during _typecheck_ instead of monomorphization, hence adapting the original approach in #83915. I am happy to close this if people would prefer we rebase the original PR and land that -- I am partly opening to be annoying and get people thinking about this unsoundness again :heart: :smile_cat: cc: `@estebank` and `@nikomatsakis` r? types Here's a link to the thread: https://rust-lang.zulipchat.com/#narrow/stream/144729-t-types/topic/PR.20.2383915/near/235421351 for more context.
2022-09-21Adding needs-unwind for test using panic::catch_unwindAndrew Pollack-2/+3
2022-09-21Auto merge of #100214 - scottmcm:strict-range, r=thomccbors-0/+14
Optimize `array::IntoIter` `.into_iter()` on arrays was slower than it needed to be (especially compared to slice iterator) since it uses `Range<usize>`, which needs to handle degenerate ranges like `10..4`. This PR adds an internal `IndexRange` type that's like `Range<usize>` but with a safety invariant that means it doesn't need to worry about those cases -- it only handles `start <= end` -- and thus can give LLVM more information to optimize better. I added one simple demonstration of the improvement as a codegen test. (`vec::IntoIter` uses pointers instead of indexes, so doesn't have this problem, but that only works because its elements are boxed. `array::IntoIter` can't use pointers because that would keep it from being movable.)
2022-09-21Adding ignore fuchsia non-applicable commandsAndrew Pollack-0/+1
2022-09-21Adding ignore fuchsia tests for execvp (pre_exec)Andrew Pollack-0/+1
2022-09-20Adding ignore fuchsia tests for execvpAndrew Pollack-0/+1
2022-09-20Adding needs-unwind to tests involving changing memory size of Futures/ClosuresAndrew Pollack-0/+3
2022-09-20Auto merge of #102061 - notriddle:rollup-kwu9vp8, r=notriddlebors-85/+238
Rollup of 12 pull requests Successful merges: - #100250 (Manually cleanup token stream when macro expansion aborts.) - #101014 (Fix -Zmeta-stats ICE by giving `FileEncoder` file read permissions) - #101958 (Improve error for when query is unsupported by crate) - #101976 (MirPhase: clarify that linting is not a semantic change) - #102001 (Use LLVM C-API to build atomic cmpxchg and fence) - #102008 (Add GUI test for notable traits element position) - #102013 (Simplify rpitit handling on lower_fn_decl) - #102021 (some post-valtree cleanup) - #102027 (rustdoc: remove `docblock` class from `item-decl`) - #102034 (rustdoc: remove no-op CSS `h1-6 { border-bottom-color }`) - #102038 (Make the `normalize-overflow` rustdoc test actually do something) - #102053 (:arrow_up: rust-analyzer) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-09-20Rollup merge of #102038 - jyn514:rustdoc-normalize-test, r=compiler-errorsMichael Howell-0/+2
Make the `normalize-overflow` rustdoc test actually do something Since https://github.com/rust-lang/rust/pull/88679, rustdoc doesn't load crates eagerly. Add an explicit `extern crate` item to make sure the crate is loaded and the bug reproduces. You can verify this fix by adding `// compile-flags: -Znormalize-docs` and running the test to make sure it gives an error.
2022-09-20Rollup merge of #102034 - notriddle:notriddle/border-bottom, r=GuillaumeGomezMichael Howell-13/+13
rustdoc: remove no-op CSS `h1-6 { border-bottom-color }` For this rule to have an actual effect, the border-bottom width needs specified, elsewhere, without also specifying the color. This doesn't happen. Ever since 88b137d5fe0cbe28dab4f9af61045c726f831872, every spot where headers get a border assigned to them also assigns the color. Preview: https://notriddle.com/notriddle-rustdoc-test/border-bottom/rustc_monomorphize/collector/index.html
2022-09-20Rollup merge of #102027 - notriddle:notriddle/docblock-item-decl, ↵Michael Howell-72/+72
r=GuillaumeGomez rustdoc: remove `docblock` class from `item-decl` This class was originally added in 73b97c7e7c9cfac4dfa4804654b1db6ab687b589 to support hiding and showing the item, because `main.js` went through all `docblock` elements in the DOM and added toggles to them. https://github.com/rust-lang/rust/blob/73b97c7e7c9cfac4dfa4804654b1db6ab687b589/src/librustdoc/html/static/main.js#L1856-L1867 The `item-decl` is no longer auto-hidden since c96f86de3026f864e78397aff9097e885f2f8fdf removed it. `item-decl` used to be called `type-decl`: that name was changed in 8b7a2dd4626acf164e1ce8397878b3f5af83d585. The `docblock` class is no longer used for implementing toggles, since rustdoc switched to using `<details>` elements. Preview: https://notriddle.com/notriddle-rustdoc-test/docblock-item-decl/rustdoc/clean/types/enum.Type.html
2022-09-20Rollup merge of #102008 - GuillaumeGomez:notable-trait-gui-test, r=notriddleMichael Howell-0/+103
Add GUI test for notable traits element position Fixes #101891. r? ````@notriddle````
2022-09-20Rollup merge of #100250 - cjgillot:recover-token-stream, r=Aaron1011Michael Howell-0/+48
Manually cleanup token stream when macro expansion aborts. In case of syntax error in macro expansion, the expansion code can decide to stop processing anything. In that case, the token stream is malformed. This makes downstream users, like derive macros, ICE. In this case, this PR manually cleans up the token stream by closing all currently open delimiters. Fixes https://github.com/rust-lang/rust/issues/96818. Fixes https://github.com/rust-lang/rust/issues/80447. Fixes https://github.com/rust-lang/rust/issues/81920. Fixes https://github.com/rust-lang/rust/issues/91023.
2022-09-20Better binder treatmentMichael Goulet-0/+41
2022-09-20Auto merge of #101989 - ↵bors-0/+14
fee1-dead-contrib:const_trait_impl-assoc-caller-bounds, r=oli-obk make projection bounds with const bounds satisfy const Fixes #101982.
2022-09-20Move some tests to more reasonable directoriesCaio-171/+0
2022-09-20Add test for sidebar elements in the "All types" pageGuillaume Gomez-0/+35
2022-09-20Auto merge of #99806 - oli-obk:unconstrained_opaque_type, r=estebankbors-24/+122
Allow patterns to constrain the hidden type of opaque types fixes #96572 reverts a revert as original PR was a perf regression that was fixed by reverting it: https://github.com/rust-lang/rust/pull/99368#issuecomment-1186587864) TODO: * check if https://github.com/rust-lang/rust/issues/99685 is avoided
2022-09-20Add the `#[derive_const]` attributeDeadbeef-2/+73
2022-09-20fix ConstProp handling of written_only_inside_own_block_localsRalf Jung-0/+120
2022-09-20Auto merge of #101806 - BelovDV:issue-fix-fn-find_library, r=petrochenkovbors-0/+53
fix verbatim with upstream dependencies https://github.com/rust-lang/rust/issues/99425#issuecomment-1207224161 r? `@petrochenkov`
2022-09-20fix verbatim with upstream dependenciesbors-0/+53
https://github.com/rust-lang/rust/issues/99425#issuecomment-1207224161 r? `@petrochenkov`
2022-09-19Optimize `array::IntoIter`Scott McMurray-0/+14
`.into_iter()` on arrays was slower than it needed to be (especially compared to slice iterator) since it uses `Range<usize>`, which needs to handle degenerate ranges like `10..4`. This PR adds an internal `IndexRange` type that's like `Range<usize>` but with a safety invariant that means it doesn't need to worry about those cases -- it only handles `start <= end` -- and thus can give LLVM more information to optimize better. I added one simple demonstration of the improvement as a codegen test.
2022-09-19Make the `normalize-overflow` rustdoc test actually do somethingJoshua Nelson-0/+2
Since https://github.com/rust-lang/rust/pull/88679, rustdoc doesn't load crates eagerly. Add an explicit `extern crate` item to make sure the crate is loaded and the bug reproduces. You can verify this fix by adding `// compile-flags: -Znormalizing-docs` and running the test.
2022-09-19Make cycle errors recoverableJoshua Nelson-0/+1
In particular, this allows rustdoc to recover from cycle errors when normalizing associated types for documentation. In the past, `@jackh726` has said we need to be careful about overflow errors: > Off the top of my head, we definitely should be careful about treating overflow errors the same as "not implemented for some reason" errors. Otherwise, you could end up with behavior that is different depending on recursion depth. But, that might be context-dependent. But cycle errors should be safe to unconditionally report; they don't depend on the recursion depth, they will always be an error whenever they're encountered.
2022-09-19Remove useless color assertions on 0px bordersMichael Howell-13/+13
2022-09-20Auto merge of #102022 - matthiaskrgr:rollup-emwfjd1, r=matthiaskrgrbors-18/+77
Rollup of 11 pull requests Successful merges: - #101389 (Tone down explanation on RefCell::get_mut) - #101798 (Make `from_waker`, `waker` and `from_raw` unstably `const`) - #101881 (Remove an unused struct field `late_bound`) - #101904 (Add help for invalid inline argument) - #101966 (Add unit test for identifier Unicode emoji diagnostics) - #101979 (Update release notes for 1.64) - #101985 (interpret: expose generate_stacktrace without full InterpCx) - #102004 (Try to clarify what's new in 1.64.0 ffi types) - #102005 (rustdoc: remove unused CSS `td.summary-column`) - #102017 (Add all submodules to the list of directories tidy skips) - #102019 (Remove backed off PRs from relnotes) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-09-19Adding ignore fuchsia tests for Backtrace, ErrorKind casesAndrew Pollack-4/+10
2022-09-19Adding needs-unwind to nicer-assert-messages compiler ui testsAndrew Pollack-0/+3
2022-09-19rustdoc: update test cases for changed item-decl HTMLMichael Howell-72/+72