about summary refs log tree commit diff
path: root/src/test/run-pass/issues
AgeCommit message (Collapse)AuthorLines
2018-12-17Address LLVM assertion failure by prepopulating with *just* name-anon-globals.Felix S. Klock II-1/+1
2018-12-14add coherence future-compat warnings for marker-only trait objectsAriel Ben-Yehuda-0/+57
The future-compat warnings break code that assumes that `dyn Send + Sync != dyn Sync + Send`, and are the first step in making them equal. cc #33140. It should be possible to revert this commit when we're done with the warnings.
2018-12-14fix issue 54153 by ignoring issue-18804 test on windows/mac.Felix S. Klock II-0/+5
As a drive-by, add `-C no-prepopulate-passes` as suggested by nikic.
2018-12-11std: Depend directly on crates.io cratesAlex Crichton-4/+4
Ever since we added a Cargo-based build system for the compiler the standard library has always been a little special, it's never been able to depend on crates.io crates for runtime dependencies. This has been a result of various limitations, namely that Cargo doesn't understand that crates from crates.io depend on libcore, so Cargo tries to build crates before libcore is finished. I had an idea this afternoon, however, which lifts the strategy from #52919 to directly depend on crates.io crates from the standard library. After all is said and done this removes a whopping three submodules that we need to manage! The basic idea here is that for any crate `std` depends on it adds an *optional* dependency on an empty crate on crates.io, in this case named `rustc-std-workspace-core`. This crate is overridden via `[patch]` in this repository to point to a local crate we write, and *that* has a `path` dependency on libcore. Note that all `no_std` crates also depend on `compiler_builtins`, but if we're not using submodules we can publish `compiler_builtins` to crates.io and all crates can depend on it anyway! The basic strategy then looks like: * The standard library (or some transitive dep) decides to depend on a crate `foo`. * The standard library adds ```toml [dependencies] foo = { version = "0.1", features = ['rustc-dep-of-std'] } ``` * The crate `foo` has an optional dependency on `rustc-std-workspace-core` * The crate `foo` has an optional dependency on `compiler_builtins` * The crate `foo` has a feature `rustc-dep-of-std` which activates these crates and any other necessary infrastructure in the crate. A sample commit for `dlmalloc` [turns out to be quite simple][commit]. After that all `no_std` crates should largely build "as is" and still be publishable on crates.io! Notably they should be able to continue to use stable Rust if necessary, since the `rename-dependency` feature of Cargo is soon stabilizing. As a proof of concept, this commit removes the `dlmalloc`, `libcompiler_builtins`, and `libc` submodules from this repository. Long thorns in our side these are now gone for good and we can directly depend on crates.io! It's hoped that in the long term we can bring in other crates as necessary, but for now this is largely intended to simply make it easier to manage these crates and remove submodules. This should be a transparent non-breaking change for all users, but one possible stickler is that this almost for sure breaks out-of-tree `std`-building tools like `xargo` and `cargo-xbuild`. I think it should be relatively easy to get them working, however, as all that's needed is an entry in the `[patch]` section used to build the standard library. Hopefully we can work with these tools to solve this problem! [commit]: https://github.com/alexcrichton/dlmalloc-rs/commit/28ee12db813a3b650a7c25d1c36d2c17dcb88ae3
2018-12-11Fix some misbehaving testsvarkor-0/+1
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-6/+7
2018-11-25Rollup merge of #56072 - da-x:stabilize-literal-matcher, r=petrochenkovPietro Albini-1/+0
Stabilize macro_literal_matcher This followed FCP in #35625. Closes #35625
2018-11-21macro_literal_matcher: fixes per petrochenkov's reviewDan Aloni-1/+0
2018-11-21Stabilize macro_literal_matcherDan Aloni-1/+1
2018-11-18Remove mir::StatementKind::EndRegionMatthew Jasper-1/+1
Since lexical MIR borrow check is gone, and validation no longer uses these, they can be removed.
2018-11-11Rollup merge of #55687 - alexreg:fix-24010, r=scalexmPietro Albini-0/+22
Take supertraits into account when calculating associated types Fixes #24010 and #23856. Applies to trait aliases too. As a by-product, this PR also makes repeated bindings of the same associated item in the same definition a hard error. This was previously a warning with a note about it becoming a hard error in the future. See #50589 for more info. I talked about this with @nikomatsakis recently, but only very superficially, so this shouldn't stop anyone from assigning it to themself to review and r+. N.B. The "WIP" commits represent imperfect attempts to solve the problem just for trait objects, but I've left them in for reference for the sake of whomever is reviewing this. CC @carllerche @theemathas @durka @mbrubeck
2018-11-08Deprecate channel selectionStjepan Glavina-0/+1
2018-11-07Added tests.Alexander Regueiro-0/+22
2018-10-30Regression test for issue #54477.Felix S. Klock II-0/+25
I removed the original file that more completely captured the original crate's tests, as its source crate (https://crates.io/crates/collection) is licensed under GPL3, and I suspect that license is not loose enough for me to put into our repo under our MIT/Apache licensing. (Would it be an option to attach the GPL3 licesne to just the one test? Probably. But do I want to bother with it that that point? Nope!)
2018-10-23fix typos in various placesMatthias Krüger-1/+1
2018-10-16Add ignore-compare-mode-nll to some run-pass tests that become compile-fail ↵Felix S. Klock II-0/+46
under #54986.
2018-10-07Auto merge of #54810 - 1aim:unused-impl-trait, r=oli-obkbors-23/+0
Fix dead code lint for functions using impl Trait Fixes https://github.com/rust-lang/rust/issues/54754 This is a minimal fix that doesn't add any new queries or touches unnecessary code. Please nominate for beta backport if wanted.
2018-10-07Auto merge of #54835 - ↵bors-5/+0
oli-obk:mögen_konstante_funktionen_doch_bitte_endlich_stabil_sein, r=Centril Stabilize `min_const_fn` tracking issue: #53555 r? @Centril
2018-10-07Auto merge of #54451 - alexcrichton:no-mangle-extern-linkage, r=michaelwoeristerbors-0/+1
rustc: Allow `#[no_mangle]` anywhere in a crate This commit updates the compiler to allow the `#[no_mangle]` (and `#[export_name]` attributes) to be located anywhere within a crate. These attributes are unconditionally processed, causing the compiler to always generate an exported symbol with the appropriate name. After some discussion on #54135 it was found that not a great reason this hasn't been allowed already, and it seems to match the behavior that many expect! Previously the compiler would only export a `#[no_mangle]` symbol if it were *publicly reachable*, meaning that it itself is `pub` and it's otherwise publicly reachable from the root of the crate. This new definition is that `#[no_mangle]` *is always reachable*, no matter where it is in a crate or whether it has `pub` or not. This should make it much easier to declare an exported symbol with a known and unique name, even when it's an internal implementation detail of the crate itself. Note that these symbols will persist beyond LTO as well, always making their way to the linker. Along the way this commit removes the `private_no_mangle_functions` lint (also for statics) as there's no longer any need to lint these situations. Furthermore a good number of tests were updated now that symbol visibility has been changed. Closes #54135
2018-10-06rustc: Allow `#[no_mangle]` anywhere in a crateAlex Crichton-0/+1
This commit updates the compiler to allow the `#[no_mangle]` (and `#[export_name]` attributes) to be located anywhere within a crate. These attributes are unconditionally processed, causing the compiler to always generate an exported symbol with the appropriate name. After some discussion on #54135 it was found that not a great reason this hasn't been allowed already, and it seems to match the behavior that many expect! Previously the compiler would only export a `#[no_mangle]` symbol if it were *publicly reachable*, meaning that it itself is `pub` and it's otherwise publicly reachable from the root of the crate. This new definition is that `#[no_mangle]` *is always reachable*, no matter where it is in a crate or whether it has `pub` or not. This should make it much easier to declare an exported symbol with a known and unique name, even when it's an internal implementation detail of the crate itself. Note that these symbols will persist beyond LTO as well, always making their way to the linker. Along the way this commit removes the `private_no_mangle_functions` lint (also for statics) as there's no longer any need to lint these situations. Furthermore a good number of tests were updated now that symbol visibility has been changed. Closes #54135
2018-10-05Stabilize `min_const_fn`Oliver Schneider-5/+0
2018-10-04Convert issue-49556.rs to compile-passJonas Schievink-31/+0
2018-10-04Fix dead code lint for functions using impl TraitJonas Schievink-0/+8
2018-10-03Only promote calls to `#[rustc_promotable]` const fnsOliver Schneider-1/+3
2018-10-02Rollup merge of #54702 - RalfJung:fn-ptr-promotion, r=oli-obkPietro Albini-0/+8
do not promote comparing function pointers This *could* break existing code that relied on fn ptr comparison getting promoted to `'static` lifetime. Fixes https://github.com/rust-lang/rust/issues/54696
2018-10-02Rollup merge of #54680 - RalfJung:compile-pass, r=pnkfelixPietro Albini-7152/+0
make run-pass tests with empty main just compile-pass tests Many run-pass tests have an empty main, so there is not actually any point in running them. This makes them `compile-pass` tests instead, saving some time (generating the binary and then running it). For now I did this only for `run-pass/issues`; if there is interest I can also do it for the other directories. I used `^\s*fn\s+main\(\s*\)\s*\{\s*\}` as regexp to identify these files.
2018-10-02move some more testsRalf Jung-1416/+0
2018-09-30do not promote comparing function pointersRalf Jung-0/+8
2018-09-30make run-pass tests with empty main just compile-pass testsRalf Jung-5736/+0
2018-09-28Prefer `#![feature(bind_by_move_pattern_guards)]` over `-Z ↵Felix S. Klock II-4/+3
disable_ast_check_for_mutation_in_guard`
2018-09-27Allow `unused_variables` lint to placate test failure exposed by macos builders.Felix S. Klock II-0/+1
2018-09-27Allow more lints that signalled on the arm-android test run.Felix S. Klock II-1/+2
2018-09-26Add `#[allow(unused_mut)]` for various cases that arise only in ↵Felix S. Klock II-0/+2
compare-mode=nll.
2018-09-26Add `#![allow(..)]` as necessary to get re-migrated run-pass tests compiling ↵Felix S. Klock II-0/+388
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/+35122
Fix #54047