about summary refs log tree commit diff
path: root/src/test/run-pass
AgeCommit message (Collapse)AuthorLines
2018-10-15Rollup merge of #54820 - kleimkuhler:issue-54538-unused_patterns-lint, ↵Manish Goregaokar-0/+1
r=nikomatsakis Closes #54538: `unused_patterns` lint Closes #54538 r? @nikomatsakis
2018-10-12`#[must_use]` for associated functions is supposed to actually workZack M. Davis-1/+1
In the comments of (closed, defunct) pull request #54884, Mazdak "Centril" Farrokhzad noted that must-use annotations didn't work on an associated function (what other communities might call a "static method"). Subsequent logging revealed that in this case we have a `Def::Method`, whereas the lint pass was only matching on `Def::Fn`. (One could argue that those def-names are thereby misleading—must-use for self-ful methods have always worked—but documenting or reworking that can be left to another day.)
2018-10-11Auto merge of #54850 - mcr431:fix-54707-trait-function-from-macro, ↵bors-0/+42
r=nikomatsakis Fix #54707 - parse_trait_item_ now handles interpolated blocks as function body decls Fix #54707 - parse_trait_item_ now handles interpolated blocks as function body decls Previously parsing trait items only handled opening brace token and semicolon, I added a branch to the match statement that will also handle interpolated blocks.
2018-10-10Accept `Option<Box<$t:ty>>` in macro argumentEsteban Küber-0/+16
Given the following code, compile successfuly: ``` macro_rules! test { ( fn fun() -> Option<Box<$t:ty>>; ) => { fn fun(x: $t) -> Option<Box<$t>> { Some(Box::new(x)) } } } test! { fn fun() -> Option<Box<i32>>; } ```
2018-10-09Add clarifying pattern lint comment and revert testKevin Leimkuhler-1/+2
2018-10-09Simply unused_parens check and add testsKevin Leimkuhler-1/+1
2018-10-09Remove `feature(tool_lints)` from testsflip1995-2/+2
2018-10-08parse_trait_item_ now handles interpolated blocks as function body declsMatthew Russo-0/+42
2018-10-08Reattach all grandchildren when constructing specialization graph.Masaki Hara-0/+29
This commit fixes the issue #50452.
2018-10-07Auto merge of #54810 - 1aim:unused-impl-trait, r=oli-obkbors-114/+1
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-22/+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-22/+0
2018-10-04rename skolemized to placeholderNiko Matsakis-2/+2
2018-10-04Convert conservative_impl_trait.rs to compile-passJonas Schievink-26/+0
2018-10-04Convert issue-49556.rs to compile-passJonas Schievink-31/+0
2018-10-04Convert issue-49376.rs to compile-passJonas Schievink-63/+0
2018-10-04Convert existential-minimal.rs to compile-passJonas Schievink-23/+0
2018-10-04Convert impl-trait/issue-42479.rs to compile-passJonas Schievink-41/+0
2018-10-04Call Foo::async_method in the async-await testJonas Schievink-14/+1
2018-10-04Fix dead code lint for functions using impl TraitJonas Schievink-0/+84
2018-10-03Only promote calls to `#[rustc_promotable]` const fnsOliver Schneider-2/+7
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-10-02Auto merge of #54701 - arielb1:outlives-later, r=nikomatsakisbors-0/+54
normalize param-env type-outlives predicates last The normalization of type-outlives predicates can depend on misc. environment predicates, but not the other way around. Inferred lifetime bounds can propagate type-outlives bounds far and wide, so their normalization needs to work well. Fixes #54467 r? @nikomatsakis beta-nominating because this is required for inferred_outlives_bounds, which is in beta
2018-10-01normalize param-env type-outlives predicates lastAriel Ben-Yehuda-0/+54
The normalization of type-outlives predicates can depend on misc. environment predicates, but not the other way around. Inferred lifetime bounds can propagate type-outlives bounds far and wide, so their normalization needs to work well. Fixes #54467
2018-10-01Auto merge of #54667 - RalfJung:maybe-uninit, r=pnkfelixbors-0/+83
Panic when using mem::uninitialized or mem::zeroed on an uninhabited type All code by @japaric. This re-submits one half of https://github.com/rust-lang/rust/pull/53508. This is likely not the one that introduced the perf regression, but just to be sure I'll do a perf run anyway.
2018-10-01Rollup merge of #54676 - ↵kennytm-4/+3
pnkfelix:issue-15287-kill-zflag-disabling-ast-check, r=alexcrichton Remove `-Z disable_ast_check_for_mutation_in_guard` One should use `#![feature(bind_by_move_pattern_guards)]` over `-Z disable_ast_check_for_mutation_in_guard` cc #15287
2018-09-30do not promote comparing function pointersRalf Jung-0/+8
2018-09-30the test requires unwinding so we don't run it on the wasm32-bare targetJorge Aparicio-0/+1
2018-09-30allow dead_codeJorge Aparicio-0/+1
2018-09-30add empty enum to the test casesJorge Aparicio-0/+20
2018-09-30improve the run-pass testJorge Aparicio-4/+34
2018-09-30panic when instantiating an uninhabited type via mem::{uninitialized,zeroed}Jorge Aparicio-0/+31
2018-09-30make run-pass tests with empty main just compile-pass testsRalf Jung-5736/+0
2018-09-30Auto merge of #54596 - mjbshaw:drop, r=RalfJungbors-11/+48
Make core::mem::needs_drop a const fn This fixes #51929.
2018-09-30Auto merge of #54639 - nagisa:lets-alias-for-now, r=eddybbors-0/+33
Do not put noalias annotations by default This will be re-enabled sooner or later depending on results of further investigation. Fixes #54462 Beta backport is: #54640 r? @nikomatsakis
2018-09-29Merge branch 'master' into dropMichael Bradshaw-83/+107194
2018-09-30Auto merge of #54601 - cuviper:prep-1.31, r=Mark-Simulacrumbors-2/+0
Bump to 1.31.0 and bootstrap from 1.30 beta Closes #54594.
2018-09-29Do not put noalias annotations by defaultSimonas Kazlauskas-0/+33
This will be re-enabled sooner or later depending on results of further investigation. Fixes #54462
2018-09-29Revert "Auto merge of #53508 - japaric:maybe-uninit, r=RalfJung"Ralf Jung-83/+0
This reverts commit c6e3d7fa3113aaa64602507f39d4627c427742ff, reversing changes made to 4591a245c7eec9f70d668982b1383cd2a6854af5.
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-27Bump to 1.31.0 and bootstrap from 1.30 betaJosh Stone-2/+0
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/+3
2018-09-27Allow some lints that only fired on 32-bit and/or Windows.Felix S. Klock II-0/+2
2018-09-26Gate const core::mem::needs_drop behind const_needs_dropMichael Bradshaw-0/+2
2018-09-26Make core::mem::needs_drop a const fnMichael Bradshaw-0/+37