about summary refs log tree commit diff
path: root/src/test/run-pass
AgeCommit message (Collapse)AuthorLines
2018-09-26Add `#[allow(unused_mut)]` for various cases that arise only in ↵Felix S. Klock II-0/+3
compare-mode=nll.
2018-09-26Add `#![allow(..)]` as necessary to get re-migrated run-pass tests compiling ↵Felix S. Klock II-67/+1030
with clean stderr again. Most were added mechanically.
2018-09-26Migrate `src/test/ui/run-pass/*` back to `src/test/run-pass/`.Felix S. Klock II-0/+106225
Fix #54047
2018-09-25Auto merge of #53542 - alexreg:impl-trait-in-bindings, r=cramertjbors-0/+56
`impl trait` in bindings (feature: impl-trait-existential-types) This PR enables `impl Trait` syntax (opaque types) to be used in bindings, e.g. * `let foo: impl Clone = 1;` * `static foo: impl Clone = 2;` * `const foo: impl Clone = 3;` This is part of [RFC 2071](https://github.com/rust-lang/rfcs/blob/master/text/2071-impl-trait-existential-types.md) ([tracking issue](https://github.com/rust-lang/rust/issues/34511)), but exists behind the separate feature gate `impl_trait_in_bindings`. CC @cramertj @oli-obk @eddyb @Centril @varkor
2018-09-25Auto merge of #53693 - scottmcm:marker-trait-attribute, r=nikomatsakisbors-0/+35
Support an explicit annotation for marker traits From the tracking issue for rust-lang/rfcs#1268: > It seems obvious that we should make a `#[marker]` annotation. ~ https://github.com/rust-lang/rust/issues/29864#issuecomment-368959441 This PR allows you to put `#[marker]` on a trait, at which point: - [x] The trait must not have any items ~~All of the trait's items must have defaults~~ - [x] Any impl of the trait must be empty (not override any items) - [x] But impls of the trait are allowed to overlap r? @nikomatsakis
2018-09-25Added tests.Alexander Regueiro-0/+56
2018-09-23Auto merge of #54339 - cramertj:no-cx, r=aturonbors-41/+15
Remove spawning from task::Context r? @aturon cc https://github.com/rust-lang-nursery/wg-net/issues/56
2018-09-23allow dead_codeJorge Aparicio-0/+1
2018-09-22the test requires unwinding so we don't run it on the wasm32-bare targetJorge Aparicio-0/+1
2018-09-22add empty enum to the test casesJorge Aparicio-0/+20
2018-09-22improve the run-pass testJorge Aparicio-4/+34
2018-09-22panic when instantiating an uninhabited type via mem::{uninitialized,zeroed}Jorge Aparicio-0/+31
2018-09-21Allow unused_imports lint on test where lint only fires on non-linux targets...Felix S. Klock II-0/+2
2018-09-21Allow dead_code lint on some tests where the lint only fires on non-x86 ↵Felix S. Klock II-0/+2
targets...
2018-09-21Run the newly `ui`-ified run-pass tests under `compare-mode=nll` as well.Felix S. Klock II-0/+4
Fix #53764.
2018-09-21Add expected output for compiler to tests of optimization-fuel-{0,1}.rs.Felix S. Klock II-0/+2
2018-09-21Ignore the output itself on `rustc-rust-log.rs` (added in rust-lang/rust#42737).Felix S. Klock II-0/+9
2018-09-21Workaround rust-lang/rust#54222 by just ignoring the warning about the ↵Felix S. Klock II-0/+2
linker flag.
2018-09-21Allow various lints as part of ui-ifying `src/test/run-pass` suite.Felix S. Klock II-0/+296
2018-09-19Require that marker impls are empty, but allow them to overlapScott McMurray-0/+35
2018-09-19Remove spawning from task::ContextTaylor Cramer-41/+15
2018-09-19Auto merge of #53877 - withoutboats:compositional-pin, r=aturonbors-12/+10
Update to a new pinning API. ~~Blocked on #53843 because of method resolution problems with new pin type.~~ @r? @cramertj cc @RalfJung @pythonesque anyone interested in #49150
2018-09-17Cleanup and fix method resolution issueTaylor Cramer-12/+10
2018-09-11Recover proper regression test for issue #16278.Felix S. Klock II-1/+0
2018-09-10Auto merge of #54000 - jkozlowski:fix-53174, r=cramertjbors-1/+52
Allow named lifetimes in async functions. - Fixes #53174 Code by @eddyb; @cramertj suggested I lift it off another change so we can fix #53174. r? @cramertj
2018-09-10rustc_resolve: ignore uniform_paths canaries that resolve to an import of ↵Eduard-Mihai Burtescu-29/+0
the same crate.
2018-09-09Auto merge of #53998 - eddyb:issue-53728, r=oli-obkbors-0/+26
rustc_codegen_llvm: don't assume offsets are always aligned. Fixes #53728 by taking into account not just overall type alignment and the field's alignment when determining whether a field is aligned or not ("packed"), but also the field's offset within the type. Previously, rustc assumed that the offset was always at least as aligned as `min(struct.align, field.align)`. However, there's no real reason to have that assumption, and it obviously can't always be true after we implement `#[repr(align(N), pack(K))]`. There's also a case today where that assumption is not true, involving niche discriminants in enums: Suppose that we have the code in #53728: ```Rust #[repr(u16)] enum DeviceKind { Nil = 0, } #[repr(packed)] struct DeviceInfo { endianness: u8, device_kind: DeviceKind, } struct Wrapper { device_info: DeviceInfo, data: u32 } ``` Observe the layout of `Option<Wrapper>`. It has an alignment of 4 because of the `u32`. `device_info.device_kind` is a good niche field to use, which means the enum ends up with this layout: ``` size = 8 align = 4 fields = [ { offset=1, type=u16 } // discriminant, .<Some>.device_info.device_kind ] ``` And here we have an discriminant with alignment 2 (`u16`) but offset 1.
2018-09-08Rollup merge of #53993 - eddyb:issue-53691, r=petrochenkovkennytm-0/+37
rustc_resolve: don't record uniform_paths canaries as reexports. Fixes #53691, fixes #53484.
2018-09-07Rollup merge of #53994 - pnkfelix:issue-53764-migrate-run-pass-dirs-to-ui, ↵kennytm-7266/+0
r=alexcrichton migrate run-pass/*/ to ui/run-pass I think this is all that remains of #53764
2018-09-07Rollup merge of #53992 - ↵kennytm-1266/+0
pnkfelix:issue-53764-migrate-run-pass-borrowck-to-ui, r=nikomatsakis migrate run-pass/borrowck to ui/run-pass Part of #53764
2018-09-07Rollup merge of #53860 - pnkfelix:issue-53764-migrate-run-pass-to-ui, ↵kennytm-93356/+0
r=nikomatsakis Migrate (some) of run-pass/ to ui This is a step towards addressing #53764. Much still remains. I went through a large portion of the `*.rs` files that were directly stored into `src/test/run-pass/` and moved them into various subdirectories of a newly created `src/test/ui/run-pass/`. (yes, it would have perhaps been nice to meld it more directly with directories already in `src/test/ui/`; but the sad truth is that opens up the reality of filename collisions, and one of my short term goals for resolving #53764 is to keep the *filenames* invariant, even as their parents directories and contents are mildly revised...)
2018-09-06Fixup whitespaceJakub Kozlowski-9/+9
2018-09-06rustc_resolve: allow `use crate_name;` under `uniform_paths`.Eduard-Mihai Burtescu-0/+29
2018-09-06Allow named lifetimes in async functions.Jakub Kozlowski-1/+52
- Fixes #53174
2018-09-06rustc_codegen_llvm: don't assume offsets are always aligned.Eduard-Mihai Burtescu-0/+26
2018-09-06Migrated remaining `src/test/run-pass/` subdirectories to ↵Felix S. Klock II-7266/+0
`src/test/ui/run-pass/`.
2018-09-06rustc_resolve: don't record uniform_paths canaries as reexports.Eduard-Mihai Burtescu-0/+37
2018-09-06Migrated `src/test/run-pass/borrowck` to `src/test/ui/run-pass`.Felix S. Klock II-1266/+0
Just shuffling files here; the needed updates to content come later.
2018-09-06Move a bunch of auxiliary support files into `ui/run-pass/**/auxiliary`.Felix S. Klock II-4068/+0
2018-09-06Migrated slew of run-pass tests to various subdirectories of `ui/run-pass/`.Felix S. Klock II-89288/+0
2018-09-06Auto merge of #53721 - arielb1:exhaustively-unpun, r=nikomatsakisbors-0/+29
fix `is_non_exhaustive` confusion between structs and enums Structs and enums can both be non-exhaustive, with a very different meaning. This PR splits `is_non_exhaustive` to 2 separate functions - 1 for structs, and another for enums, and fixes the places that got the usage confused. Fixes #53549. r? @eddyb
2018-09-03Auto merge of #53697 - Cyres:const-fn-int-ops, r=oli-obkbors-0/+174
Add more const int ops r? @oli-obk Tracking Issue: #53718 list of `const fn`s in this PR: - `feature = const_int_rotate` - `rotate_left` - `rotate_right` - `feature = const_int_wrapping` - `wrapping_add` - `wrapping_sub` - `wrapping_mul` - `wrapping_shl` - `wrapping_shr` - `feature = const_int_overflowing` - `overflowing_add` - `overflowing_sub` - `overflowing_mul` - `overflowing_shl` - `overflowing_shr` - `feature = const_int_sign` - `is_positive` - `is_negative` - `feature = const_int_conversion` - `reverse_bits` - `to_le_bytes` - `to_ne_bytes` - `from_be_bytes` - `from_le_bytes` - `from_ne_bytes` - `reverse_bits`
2018-09-03Add missing braceTim Diekmann-1/+1
2018-09-03Add ident function to the rest of the testsCyres-22/+34
2018-09-03Wrap rhs in ident functionTim Diekmann-7/+11
2018-09-01rebaseTim-0/+158
2018-09-01Auto merge of #53604 - oli-obk:min_const_fn, r=Centril,varkorbors-19/+21
Implement the `min_const_fn` feature gate cc @RalfJung @eddyb r? @Centril implements the feature gate for #53555 I added a hack so the `const_fn` feature gate also enables the `min_const_fn` feature gate. This ensures that nightly users of `const_fn` don't have to touch their code at all. The `min_const_fn` checks are run first, and if they succeeded, the `const_fn` checks are run additionally to ensure we didn't miss anything.
2018-08-31Auto merge of #53755 - llogiq:fix-unsound-16bit-range, r=nagisabors-0/+23
fix u32 steps_between for 16-bit systems This fixes #48006.
2018-08-31Restrict most uses of `const_fn` to `min_const_fn`Oliver Schneider-18/+18
2018-08-31Implement the `min_const_fn` feature gateOliver Schneider-1/+3