about summary refs log tree commit diff
path: root/src/test/ui/intrinsics
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-1650/+0
2022-12-24ignore some targetsRalf Jung-0/+2
2022-12-22abort immediately on bad mem::zeroed/uninitRalf Jung-16/+34
2022-12-13Avoid rendering empty annotationsOli Scherer-16/+0
2022-12-13Make some diagnostics not depend on the source of what they reference being ↵Oli Scherer-12/+16
available
2022-10-22Stabilize arbitrary_enum_discriminant, take 2Deadbeef-1/+1
2022-10-07make const_err a hard errorRalf Jung-3/+1
2022-10-05change might_permit_raw_init to fully detect LLVM UB, but not more than thatRalf Jung-82/+168
2022-09-28rustc_safe_intrinsic: Add UI testArthur Cohen-0/+25
2022-09-27core: Mark all safe intrinsics with #[rustc_safe_intrinsic]Arthur Cohen-0/+1
2022-09-27attributes: Add #[rustc_safe_intrinsic] builtinArthur Cohen-0/+6
2022-09-23Rollup merge of #102134 - flba-eb:master, r=bjorn3Matthias Krüger-1/+0
Detect panic strategy using `rustc --print cfg` Instead of relying on a command line parameter, detect if a target is able to unwind or not. Ignore tests that require unwinding on targets that don't support it. I did not find any place where the removed parameter has been used, but it feels a bit risky as I'm new to this test framework. r? bjorn3
2022-09-23Restore ignore tagFlorian Bartels-1/+0
This test case actually requires std::process.
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-04Make `const_eval_select` a real intrinsicDeadbeef-30/+89
2022-08-29Make the trait bound is not satisfied specify kindObei Sideg-1/+1
2022-08-14Point to argument if it's self type of unsatisfied projection predicateMichael Goulet-2/+4
2022-08-08Adjust wordingMichael Goulet-2/+2
2022-08-07Implement special-cased projection error message for some common traitsMichael Goulet-2/+2
2022-07-30Rollup merge of #99862 - WaffleLapkin:type_mismatch_fix, r=compiler-errorsDylan DPC-2/+4
Improve type mismatch w/ function signatures This PR makes use of `note: expected/found` (instead of labeling types in labels) in type mismatch with function signatures. Pros: it's easier to compare the signatures, cons: the error is a little more verbose now. This is especially nice when - The signatures differ in a small subset of parameters (same parameters are elided) - The difference is in details, for example `isize` vs `usize` (there is a better chance that the types align) Also this PR fixes the inconsistency in variable names in the edited code (`expected` and `found`). A zulip thread from which this pr started: [[link]](https://rust-lang.zulipchat.com/#narrow/stream/147480-t-compiler.2Fwg-diagnostics/topic/Type.20error.20regression.3F.2E.2E.2E/near/289756602). An example diagnostic: <table> <tr> <th>this pr</th> <th>nightly</th> </tr> <tr> <td> ```text error[E0631]: type mismatch in function arguments --> ./t.rs:4:12 | 4 | expect(&f); | ------ ^^ expected due to this | | | required by a bound introduced by this call ... 10 | fn f(_: isize, _: u8, _: Vec<u32>) {} | ---------------------------------- found signature defined here | = note: expected function signature `fn(usize, _, Vec<u64>) -> _` found function signature `fn(isize, _, Vec<u32>) -> _` note: required because of the requirements on the impl of `Trait` for `fn(isize, u8, Vec<u32>) {f}` --> ./t.rs:8:9 | 8 | impl<F> Trait for F where F: Fn(usize, u8, Vec<u64>) -> u8 {} | ^^^^^ ^ = note: required for the cast from `fn(isize, u8, Vec<u32>) {f}` to the object type `dyn Trait` ``` </td> <td> ```text error[E0631]: type mismatch in function arguments --> ./t.rs:4:12 | 4 | expect(&f); | ------ ^^ expected signature of `fn(usize, u8, Vec<u64>) -> _` | | | required by a bound introduced by this call ... 10 | fn f(_: isize, _: u8, _: Vec<u32>) {} | ---------------------------------- found signature of `fn(isize, u8, Vec<u32>) -> _` | note: required because of the requirements on the impl of `Trait` for `fn(isize, u8, Vec<u32>) {f}` --> ./t.rs:8:9 | 8 | impl<F> Trait for F where F: Fn(usize, u8, Vec<u64>) -> u8 {} | ^^^^^ ^ = note: required for the cast to the object type `dyn Trait` ``` </td> </tr> </table> <details><summary>code</summary> <p> ```rust fn main() { fn expect(_: &dyn Trait) {} expect(&f); } trait Trait {} impl<F> Trait for F where F: Fn(usize, u8, Vec<u64>) -> u8 {} fn f(_: isize, _: u8, _: Vec<u32>) {} ``` </p> </details> r? `@compiler-errors`
2022-07-28--bless testsMaybe Waffle-2/+4
2022-07-26bless tests, remove nonexistent E0395Deadbeef-2/+2
2022-07-14Use constant eval to do strict validity checks5225225-22/+44
2022-07-08fix stderr output file after rebaseJane Losare-Lusby-23/+5
2022-07-08Support unstable moves via stable in unstable itemsJane Lusby-5/+27
2022-07-08Auto merge of #98482 - cjgillot:short-struct-span-closure, r=estebankbors-5/+5
Shorten def_span of closures to just their header Continuation of https://github.com/rust-lang/rust/pull/93967.
2022-07-07Shorten span for closures.Camille GILLOT-5/+5
2022-07-06interpret: use AllocRange in UninitByteAccessRalf Jung-1/+1
also use nice new format string syntax in interpret/error.rs
2022-06-28Rename/restructure memory ordering intrinsics.Mara Bos-119/+119
2022-05-24Add flag for stricter checks on uninit/zeroed5225225-6/+38
2022-04-26Revert "add `DefId` to unsafety violations and display function path in E0133"Oli Scherer-3/+3
This reverts commit 8b8f6653cfd54525714f02efe7af0a0f830e185c.
2022-04-24only show a simple description in E0133 span labelEmil Gardström-6/+6
2022-04-24add `DefId` to unsafety violations and display function path in E0133Emil Gardström-12/+12
this enables consumers to access the function definition that was reported to be unsafe
2022-04-09Rollup merge of #95374 - RalfJung:assert_uninit_valid, r=Mark-SimulacrumDylan DPC-0/+28
assert_uninit_valid: ensure we detect at least arrays of uninhabited types We can't easily extend this check to *all* arrays (Cc https://github.com/rust-lang/rust/pull/87041), but it turns out the existing check already catches arrays of uninhabited types. So let's make sure it stays that way by adding them to the test.
2022-04-06bless testsPietro Albini-2/+2
2022-03-27assert_uninit_valid: ensure we detect at least arrays of uninhabited typesRalf Jung-0/+28
2022-03-21Rename `~const Drop` to `~const Destruct`Deadbeef-2/+2
2022-01-26add note suggesting that predicate is satisfied but is not constMichael Goulet-0/+5
2022-01-26Improve selection errors for `~const` trait boundsDeadbeef-6/+6
2021-12-09Add needs-unwind to tests that depend on panickingDavid Koloski-0/+1
This directive isn't automatically set by compiletest or x.py, but can be turned on manually for targets that require it.
2021-11-04treat illumos like solaris in failing ui tests which need itRichard Lowe-0/+1
2021-10-25fix(rustc_typeck): report function argument errors on matching typeMichael Howell-8/+25
Fixes #90101
2021-10-14Revert "Stabilize `arbitrary_enum_discriminant`"Mark Rousskov-1/+1
This reverts commit 7a62f29f3171767090949778ce0f161e930706b9.
2021-10-14Fix const stabilityDeadbeef-0/+30
2021-10-14Avoid tupling at the calleeDeadbeef-30/+32
2021-10-12Add const_eval_select intrinsicDeadbeef-0/+164
2021-09-26Remove box syntax from most places in src/test outside of the issues direst31-2/+1
2021-09-21Disable visible path calculation for PrettyPrinter in Ok path of compilerAlik Aslanyan-5/+6
2021-07-28Stabilize `arbitrary_enum_discriminant`Deadbeef-1/+1
2021-07-14adjust testsRalf Jung-1/+1