about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2018-06-04Auto merge of #51328 - oli-obk:no_union_promotion, r=eddybbors-48/+49
Do not promote union field accesses r? @eddyb technically a breaking change, but the code errored on the previous stable and produces UB + a warning on the current stable. I don't think we need a crater run in that case.
2018-06-04Auto merge of #51334 - Mark-Simulacrum:rollup, r=Mark-Simulacrumbors-0/+32
Rollup of 6 pull requests Successful merges: - #51288 (Remove rustdoc-specific is_import field from HIR) - #51299 (const fn integer operations) - #51317 (Allow enabling incremental via config.toml) - #51323 (Generate br for all two target SwitchInts) - #51326 (Various minor slice iterator cleanups) - #51329 (Remove the unused `-Z trans-time-graph` flag.) Failed merges:
2018-06-03Rollup merge of #51299 - faern:const-int-ops, r=oli-obkMark Simulacrum-0/+32
const fn integer operations A follow up to #51171 Fixes #51267 Makes a lot of the integer methods (`swap_bytes`, `count_ones` etc) `const fn`s. See #51267 for a discussion about why this is wanted and the solution used.
2018-06-03Auto merge of #51111 - kennytm:intralink-resolution-failure-line-numbers, ↵bors-1/+36
r=GuillaumeGomez Point to the rustdoc attribute where intralink resolution failed.
2018-06-03turn run-make test into a run-make-fulldeps testJorge Aparicio-0/+0
2018-06-03Deduplicate and fix a testOliver Schneider-48/+11
2018-06-03Do not promote union field accessesOliver Schneider-0/+38
2018-06-03add more testsJorge Aparicio-0/+115
2018-06-03reject `fn panic_impl<T>(_: &PanicInfo) -> !`Jorge Aparicio-0/+23
2018-06-03implement #[panic_implementation]Jorge Aparicio-9/+159
2018-06-03Show which line the link is coming from.kennytm-0/+15
2018-06-03Ignore i128 test on asmjsLinus Färnstrand-4/+9
2018-06-03Point to the rustdoc attribute where intralink resolution failed.kennytm-1/+21
2018-06-03Auto merge of #51319 - Mark-Simulacrum:rollup, r=Mark-Simulacrumbors-5/+5
Rollup of 6 pull requests Successful merges: - #51143 (Specify that packed types must derive, not implement, Copy) - #51226 (Make Layout's align a NonZeroUsize) - #51297 (Fix run button style) - #51306 (impl Default for &mut str) - #51312 (Clarify the difference between get_mut and into_mut for OccupiedEntry) - #51313 (use type name in E0599 enum variant suggestion) Failed merges:
2018-06-02Rollup merge of #51313 - euclio:variant-name-suggestion-fix, r=oli-obkMark Simulacrum-2/+2
use type name in E0599 enum variant suggestion Also, rename the variable from "type_str" to "item_kind" to avoid the ambiguity that caused this bug.
2018-06-02Rollup merge of #51143 - Mark-Simulacrum:issue-50826, r=cramertjMark Simulacrum-3/+3
Specify that packed types must derive, not implement, Copy
2018-06-03Pass literal through black_boxLinus Färnstrand-4/+8
2018-06-03Auto merge of #50953 - GuillaumeGomez:attributes-in-other-places, ↵bors-0/+32
r=QuietMisdreavus Add attributes for trait and methods as well Fixes #48485. r? @QuietMisdreavus
2018-06-02Add attributes for trait and methods as wellGuillaume Gomez-0/+32
2018-06-02use type name in E0599 enum variant suggestionAndy Russell-2/+2
Also, rename the variable from "type_str" to "item_kind" to avoid the ambiguity that caused this bug.
2018-06-02Rollup merge of #51302 - Mark-Simulacrum:rustdoc-fast, r=QuietMisdreavusMark Simulacrum-0/+1
Permit building rustdoc without compiler artifacts None
2018-06-02Rustdoc itself no longer requires proc macros to buildMark Simulacrum-0/+1
This avoids a full compiler build in order to build and/or run tests for rustdoc.
2018-06-02Auto merge of #51063 - mixi:musl-bootstrap, r=alexcrichtonbors-0/+66
Fix building rustc on and for musl hosts. This fixes all problems I had when trying to compile rustc on a musl-based distribution (with `crt-static = false` in `config.toml`). This is a fixed version of what ended up being #50105, making it possible to compile rustc on musl targets. The differences to the old (now merged and subsequently reverted) pull request are: - The commit (6d9154a830dd9773fe8a4e34e1fc3dfb1ca6f935) that caused the regression for which the original commits were reverted in #50709 is left out. This means the corresponding bug #36710 is still not fixed with `+crt-static`. - The test for issue 36710 is skipped for musl targets (until the issue is properly fixed). - Building cargo-vendor if `crt-static = false` is needed was broken (cargo-vendor links to some shared libraries if they exist on the system and this produces broken binaries with `+crt-static`) CC @alexcrichton
2018-06-02Specify that packed types must derive, not implement, CopyMark Simulacrum-3/+3
2018-06-02Auto merge of #51274 - nikomatsakis:issue-46557-promote-ref-mut, r=eddybbors-0/+161
also check `let` arms and nested patterns for mutable borrows Fixes #46557 r? @eddyb
2018-06-02Add test for const endianess conversionLinus Färnstrand-0/+23
2018-06-02Auto merge of #51015 - nikomatsakis:issue-50672-remove-extern-crate-idiom, ↵bors-64/+230
r=alexcrichton merge unused-extern-crate and unnecessary-extern-crate lints Extend the `unused_extern_crates` lint to offer a suggestion to remove the extern crate and remove the `unnecessary_extern_crate` lint. Still a few minor issues to fix: - [x] this *does* now leave a blank line... (defer to https://github.com/rust-lang/rust/issues/51176) - idea: extend the span to be replaced by 1 character if the next character is a `\n` - [x] what about macros? do we need to watch out for that? (defer to https://github.com/rust-lang/rust/issues/48704) - [x] also it doesn't work for `extern crate foo; fn main() { foo::bar(); }` - this is subtle: the `foo` might be shadowing a glob import too, can't always remove - defer to https://github.com/rust-lang/rust/issues/51177 - [x] we also don't do the `pub use` rewrite thang (https://github.com/rust-lang/rust/issues/51013) Spun off from https://github.com/rust-lang/rust/pull/51010 Fixes #50672 r? @alexcrichton
2018-06-01Rollup merge of #51135 - estebank:sugg-7575, r=oli-obkMark Simulacrum-10/+10
Tweak output on E0599 for assoc fn used as method - Use suggestion instead of `help` when possible - Add primary span label - Remove incorrect `help` suggestion using incorrect syntax - Do not refer to only one possible candidate as `candidate #1`, refer to it as `the candidate`
2018-06-01rework to report errors from crates in a consistent orderNiko Matsakis-33/+33
We first collect unused crates into a map and then walk all extern crates in crate order.
2018-06-01merge UNNECESSARY_EXTERN_CRATE and UNUSED_EXTERN_CRATESNiko Matsakis-87/+167
2018-06-01extend `unused_extern_crates` lint with a suggestion to removeNiko Matsakis-0/+86
2018-06-01also check `let` arms and nested patterns for mutable borrowsNiko Matsakis-0/+161
2018-06-01Auto merge of #51181 - mbrubeck:prelude, r=petrochenkovbors-0/+49
Add std/core to prelude if extern_prelude enabled Fixes #50605
2018-06-01Auto merge of #51171 - faern:const-bswap-ctpop-cttz-ctlz, r=oli-obkbors-0/+23
Make some std::intrinsics `const fn`s Making some rustc intrinsics (`ctpop`, `cttz`, `ctlz` and `bswap`) `const fn`s. This is a pre-step to being able to make `swap_bytes`, `to_be` and `from_be` constant functions. That in itself could be ergonomic and useful. But even better is that it would allow `Ipv4Addr::new` etc becoming `const fn`s as well. Which might be really useful since I find it quite common to want to define them as constants. r? @oli-obk
2018-05-31Auto merge of #51096 - matthewjasper:reverse-normalization-bounds, ↵bors-0/+75
r=nikomatsakis Register outlives predicates from queries the right way around. Closes #49354 The region constraints from queries need to be reversed from sub to outlives. Note: wf checking reports these errors before NLL, so I'm not sure if there's any case when these predicates need to be created at all. cc @nikomatsakis
2018-05-31Rollup merge of #51146 - dlrobertson:fix_51102, r=estebankGuillaume Gomez-0/+72
typeck: Do not pass the field check on field error If a struct pattern has a field error return an error. Fixes: #51102
2018-05-31Register outlives predicates from queries the right way around.Matthew Jasper-0/+75
2018-05-31Make short-error format GNU compatibleGuillaume Gomez-2/+2
2018-05-31Stabilize short error formatGuillaume Gomez-1/+1
2018-05-31Add test for intrinsics::bswapLinus Färnstrand-0/+23
2018-05-31Auto merge of #51235 - nikomatsakis:issue-51117-borrowck-implicit-deref, r=eddybbors-0/+52
remove notion of Implicit derefs from mem-cat `PointerKind` is included in `LoanPath` and hence forms part of the equality check; this led to having two unequal paths that both represent `*x`, depending on whether the `*` was inserted automatically or explicitly. Bad mojo. Fixes #51117 r? @eddyb
2018-05-31typeck: Do not pass the field check on field errorDan Robertson-0/+72
If a struct pattern has a field error return an error.
2018-05-31change `PointerKind::Implicit` to a noteNiko Matsakis-0/+52
`PointerKind` is included in `LoanPath` and hence forms part of the equality check; this led to having two unequal paths that both represent `*x`, depending on whether the `*` was inserted automatically or explicitly. Bad mojo. The `note` field, in contrast, is intended more-or-less primarily for this purpose of adding extra data.
2018-05-31Add std/core to prelude if extern_prelude enabledMatt Brubeck-0/+49
Fixes #50605
2018-05-31Add a test for issue 36710.Johannes Nixdorf-0/+66
This still expectedly fails for musl targets with +crt-static.
2018-05-31Auto merge of #51182 - eddyb:not-just-visibility, r=nikomatsakisbors-26/+28
[MIR] Change "scopes" from "visibility scopes" to "source scopes". These scopes are already used for source-oriented diagnostics, lint levels and unsafety checks. This PR generalizes the naming around scopes, making the type `SourceScope`, and flips (across several commits) the relationship/priority between `LocalDecl`'s "visibility" and "syntactic" scopes. r? @nikomatsakis
2018-05-31Auto merge of #51220 - ↵bors-0/+50
nikomatsakis:issue-51008-false-positive-lifetime-must-be-declared, r=cramertj reset anonymous-lifetime-mode as we enter `()` scopes Background: The anonymous lifetime mode is used to prohibit elided lifetimes where they didn't used to be permitted, and instead require that `'_` be used. For example: ```rust impl Trait for Ref<T> { .. } // ^^^^^^ ERROR: should be `Ref<'_, T>` ``` When we are parsing the parts of the impl header, we enter into an alternate mode called `CreateParameter`. In this mode, we give an error for things like `Ref<T>`, but for elided lifetimes in a reference type like `&T` we make the elided lifetime into an in-band lifetime: https://github.com/rust-lang/rust/blob/4f99f37b7e213d69a489884f651adfc6d217cef5/src/librustc/hir/lowering.rs#L4017-L4035 This was not intended to change behavior because we only enter into that mode in contexts where elision was not historically permitted. However, the problem is that we fail to reset the mode when we enter into bounds like `Fn(&u32)`, where elision *was* allowed -- the same occurs for fn types like `fn(&u32`). This PR restores the original mode in those contexts. Fixes #51008 r? @cramertj
2018-05-30Auto merge of #51215 - eddyb:visit-for-a-lifetime, r=nikomatsakisbors-1/+17
rustc: don't visit lifetime parameters through visit_lifetime. Ideally we'd also not use the `Lifetime` struct for parameters, but I'll leave that to @varkor (#48149). Fixes #51185 (discovered while auditing all the `visit_lifetime` implementations). r? @nikomatsakis
2018-05-30also reset anon-param-mode for `fn()` typesNiko Matsakis-0/+25
2018-05-30reset the "anonymous lifetime mode" for parenthesized where clausesNiko Matsakis-0/+25
Background: The anonymous lifetime mode is used to prohibit elided lifetimes where they didn't used to be permitted, and instead require that `'_` be used. For example: ```rust impl Trait for Ref<T> { .. } // ^^^^^^ ERROR: should be `Ref<'_, T>` ``` When we are parsing the parts of the impl header, we enter into an alternate mode called `CreateParameter`. In this mode, we give an error for things like `Ref<T>`, but for elided lifetimes in a reference type like `&T` we make the elided lifetime into an in-band lifetime: https://github.com/rust-lang/rust/blob/4f99f37b7e213d69a489884f651adfc6d217cef5/src/librustc/hir/lowering.rs#L4017-L4035 This was not intended to change behavior because we only enter into that mode in contexts where elision was not historically permitted. However, the problem is that we fail to reset the mode when we enter into bounds like `Fn(&u32)`, where elision *was* allowed -- the same occurs for fn types like `fn(&u32`). This PR restores the original mode in those contexts.