about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2022-03-22Fixup aarch64 smoke testJubilee Young-5/+4
2022-03-22better errors when a Copy impl is not coherentMichael Goulet-0/+64
2022-03-22interpret/memory: simplify check_and_deref_ptrRalf Jung-8/+8
2022-03-22Test SVE2 includes NEON and not vice versaJubilee Young-0/+58
Required by https://github.com/rust-lang/rust/issues/95122
2022-03-22diagnostics: do not suggest `fn foo({ <body> }`Michael Howell-3/+1
Instead of suggesting that the body always replace the last character on the line, presuming it must be a semicolon, the parser should instead check what the last character is, and append the body if it is anything else. Fixes #83104
2022-03-22Test NEON compilesJubilee Young-0/+24
Required by https://github.com/rust-lang/rust/issues/95002
2022-03-22Filter for all features instead of anyJubilee Young-0/+64
Adds regression tests for feature logic Co-authored-by: bjorn3 <bjorn3@users.noreply.github.com> Co-authored-by: Simonas Kazlauskas <git@kazlauskas.me>
2022-03-22Fold aarch64 feature +fp into +neonJubilee Young-2/+2
Arm's FEAT_FP and Feat_AdvSIMD describe the same thing on AArch64: The Neon unit, which handles both floating point and SIMD instructions. Moreover, a configuration for AArch64 must include both or neither. Arm says "entirely proprietary" toolchains may omit floating point: https://developer.arm.com/documentation/102374/0101/Data-processing---floating-point In the Programmer's Guide for Armv8-A, Arm says AArch64 can have both FP and Neon or neither in custom implementations: https://developer.arm.com/documentation/den0024/a/AArch64-Floating-point-and-NEON In "Bare metal boot code for Armv8-A", enabling Neon and FP is just disabling the same trap flag: https://developer.arm.com/documentation/dai0527/a In an unlikely future where "Neon and FP" become unrelated, we can add "[+-]fp" as its own feature flag. Until then, we can simplify programming with Rust on AArch64 by folding both into "[+-]neon", which is valid as it supersets both. "[+-]neon" is retained for niche uses such as firmware, kernels, "I just hate floats", and so on.
2022-03-22Modernize `alloc-no-oom-handling` testMiguel Ojeda-1/+1
- The edition should be 2021 to avoid warnings. - The `external_crate` feature was removed in commit 45bf1ed1a112 ("rustc: Allow changing the default allocator"). Note that commit d620ae10709c ("Auto merge of #84266") removed the old test, but the new one introduced passed the `--cfg` like in the old one. Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2022-03-22Rollup merge of #95200 - ↵Dylan DPC-0/+13
TaKO8Ki:cancel-not-emitted-error-when-parsing-generic-arg, r=oli-obk Cancel a not emitted error after parsing const generic args closes #95163
2022-03-22Rollup merge of #95197 - frank-king:feat/unary_op_type_constrain, r=petrochenkovDylan DPC-2/+36
Suggest constraining param for unary ops when missing trait impl This PR adds a suggestion of constraining param for unary ops `-` and `!` when the corresponding trait implementation is missing. Fixs #94543. BTW, this is my first time to touch rustc, please correct me if I did anything wrong.
2022-03-22fix previous failures and address reviewb-naber-58/+70
2022-03-22cancel a not emitted error after parsing const generic argsTakayuki Maeda-0/+13
2022-03-22suggest constraining param for unary ops when missing trait implFrank King-2/+36
2022-03-22Auto merge of #95127 - ↵bors-0/+24
notriddle:notriddle/option-content-move-from-tuple-match, r=estebank diagnostics: do not give Option::as_ref suggestion for complex match Fixes #82528
2022-03-21Rollup merge of #95175 - lcnr:adt_const_params-tracking-issue, r=Dylan-DPCMatthias Krüger-41/+3
move `adt_const_params` to its own tracking issue the new tracking issue is #95174 r? ``@rust-lang/project-const-generics``
2022-03-21Rollup merge of #95129 - GuillaumeGomez:rm-source-sidebar-animation, r=jshaMatthias Krüger-1/+0
Remove animation on source sidebar Fixes https://github.com/rust-lang/rust/issues/95043. Didn't upload a demo considering how simple it is to test in a browser. :) r? ``@jsha``
2022-03-21Rollup merge of #95116 - bjorn3:cg_clif_test_fixes, r=Dylan-DPCMatthias Krüger-88/+107
Add needs-* directives to many tests These are necessary to ignore tests that need features unsupported by cg_clif.
2022-03-21Rollup merge of #95085 - ouz-a:master5, r=jackh726Matthias Krüger-0/+49
Return err instead of ICE Having `escaping_bound_vars` results in ICE when trying to create `ty::Binder::dummy`, to avoid it we return err like the line above. I think this requires a more sophisticated fix, I would love to investigate if mentorship is available 🤓 Fixes #95023 and #85350
2022-03-21Deduplicate ui-fulldeps.Camille GILLOT-6/+1
2022-03-21Add needs-asm-support directive to tests where necessarybjorn3-68/+80
2022-03-21add/update testsb-naber-137/+50
2022-03-21Return err instead of ICEouz-a-0/+49
2022-03-21move `adt_const_params` to its own tracking issuelcnr-41/+3
2022-03-21Auto merge of #95169 - Smittyvb:union-test-ub, r=bjorn3bors-54/+107
Don't run UB in test suite This splits `ui/unsafe/union.rs` to make it so only the non-UB parts are run. It also means we can do more testing of the location of error messages (which are a bit different with the THIR unsafety checker). `union-modification.rs` has no UB (according to Miri), and `union.rs` has errors (but would have UB if not for those errors). Closes #95075. r? `@bjorn3`
2022-03-21Don't run UB in test suiteSmitty-54/+107
This splits ui/unsafe/union.rs to make it so only the non-UB parts are run. It also means we can do more testing of the location of error messages.
2022-03-21add tests for 🔒Maximilian Köhl-0/+31
2022-03-21Tidy upDeadbeef-1/+5
2022-03-21Rename `~const Drop` to `~const Destruct`Deadbeef-68/+65
2022-03-21Auto merge of #95104 - compiler-errors:remove-ascription, r=davidtwcobors-0/+80
suggest removing type ascription in bad parsing position Not sure how to test this with the non-nightly suggestion. Didn't add a new UI test because it already manifests in an existing UI test. Fixes #95014
2022-03-20Rollup merge of #95135 - ↵Matthias Krüger-0/+17
TaKO8Ki:fix-not-emitted-unmatched-angle-bracket-error, r=Dylan-DPC Fix a not emitted unmatched angle bracket error closes #95128
2022-03-20Filter OnceNote in diagnostic infra.Camille GILLOT-67/+51
2022-03-20fix a not emitted unmatched angle bracket errorTakayuki Maeda-0/+17
2022-03-20Rollup merge of #94948 - jhpratt:rustc_deprecated, r=Dylan-DPCMatthias Krüger-1/+1
Fix diagnostics for `#![feature(deprecated_suggestion)]` Follow up from #94635, where I missed a couple things.
2022-03-20Auto merge of #95063 - tromey:fix-94458-gdb-char, r=Mark-Simulacrumbors-8/+25
Fix debuginfo tests with GDB 11.2 GDB 11.2 added support for DW_ATE_UTF, which caused some test failures. This fixes these tests by changing the format that is used, and adds a new test to verify that characters are emitted as something that GDB can print in a char-like way. Fixes #94458
2022-03-19diagnostics: do not give Option::as_ref suggestion for complex matchMichael Howell-0/+24
Fixes #82528
2022-03-19Remove animation on source sidebarGuillaume Gomez-1/+0
2022-03-19Add needs-unwind directive to tests where necessarybjorn3-20/+27
2022-03-19Extend --check-cfg tests to all predicate inside all/anyLoïc BRANSTETT-1/+117
2022-03-18suggest removing type ascription in bad positionMichael Goulet-0/+80
2022-03-18Rollup merge of #94295 - Urgau:cfg-always-eval-all-predicate, r=petrochenkovMatthias Krüger-0/+45
Always evaluate all cfg predicate in all() and any() This pull-request adjust the handling of the `all()` and `any()` to always evaluate every cfg predicate because not doing so result in accepting incorrect `cfg`: ```rust #[cfg(any(unix, foo::bar))] // Should error on foo::bar, but does not on unix platform (but does on non unix platform) fn foo1() {} #[cfg(all(foo, foo::bar))] // Should error on foo::bar, but does not fn foo2() {} #[cfg(all(foo::bar, foo))] // Correctly error on foo::bar fn foo3() {} #[cfg(any(foo::bar, foo))] // Correctly error on foo::bar fn foo4() {} ``` This pull-request take the side to directly turn it into a hard error instead of having a future incompatibility lint because the combination to get this incorrect behavior is unusual and highly probable that some code have this without noticing. A [search](https://cs.github.com/?scopeName=All+repos&scope=&q=lang%3Arust+%2Fany%5C%28%5Ba-zA-Z%5D%2C+%5Ba-zA-Z%5D%2B%3A%3A%5Ba-zA-Z%5D%2B%2F) on Github reveal no such instance nevertheless a Crater run should probably be done before merging this. This was discover in https://github.com/rust-lang/rust/pull/94175 when trying to lint on the second predicate. Also note that this seems to have being introduce with Rust 1.27.0: https://rust.godbolt.org/z/KnfqKv15f. r? `@petrochenkov`
2022-03-18Fix inherent impls on negative coherenceSantiago Pastorino-0/+22
2022-03-18Add test to ensure auto-traits are respecting constraintsGuillaume Gomez-0/+8
2022-03-18Auto merge of #95065 - matthiaskrgr:rollup-75i6oz5, r=matthiaskrgrbors-13/+32
Rollup of 4 pull requests Successful merges: - #95013 (Update browser-ui-test version to 0.8.2) - #95039 (Make negative coherence work when there's impl negative on super predicates) - #95047 (Refactor: remove an unnecessary pattern for ignoring all parts) - #95048 (update Miri) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-03-18Rollup merge of #95039 - spastorino:overlap-super-predicates, r=nikomatsakisMatthias Krüger-13/+32
Make negative coherence work when there's impl negative on super predicates r? `@nikomatsakis`
2022-03-18Auto merge of #88098 - Amanieu:oom_panic, r=nagisabors-0/+23
Implement -Z oom=panic This PR removes the `#[rustc_allocator_nounwind]` attribute on `alloc_error_handler` which allows it to unwind with a panic instead of always aborting. This is then used to implement `-Z oom=panic` as per RFC 2116 (tracking issue #43596). Perf and binary size tests show negligible impact.
2022-03-17Fix debuginfo tests with GDB 11.2Tom Tromey-8/+25
GDB 11.2 added support for DW_ATE_UTF, which caused some test failures. This fixes these tests by changing the format that is used, and adds a new test to verify that characters are emitted as something that GDB can print in a char-like way. Fixes #94458
2022-03-18Auto merge of #95056 - Dylan-DPC:rollup-swtuw2n, r=Dylan-DPCbors-13/+187
Rollup of 10 pull requests Successful merges: - #91133 (Improve `unsafe` diagnostic) - #93222 (Make ErrorReported impossible to construct outside `rustc_errors`) - #93745 (Stabilize ADX target feature) - #94309 ([generator_interior] Be more precise with scopes of borrowed places) - #94698 (Remove redundant code from copy-suggestions) - #94731 (Suggest adding `{ .. }` around a const function call with arguments) - #94960 (Fix many spelling mistakes) - #94982 (Add deprecated_safe feature gate and attribute, cc #94978) - #94997 (debuginfo: Fix ICE when generating name for type that produces a layout error.) - #95000 (Fixed wrong type name in comment) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-03-17Rollup merge of #94997 - michaelwoerister:fix-enum-type-name-layout-error, ↵Dylan DPC-0/+44
r=wesleywiser debuginfo: Fix ICE when generating name for type that produces a layout error. Fixes https://github.com/rust-lang/rust/issues/94961.
2022-03-17Rollup merge of #94982 - skippy10110:deprecated_safe, r=Dylan-DPCDylan DPC-0/+28
Add deprecated_safe feature gate and attribute, cc #94978