about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2019-02-15Update testsvarkor-12/+12
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-02-15Auto merge of #57880 - Zoxc:error-on-cycle, r=michaelwoeristerbors-14/+14
Always emit an error for a query cycle r? @michaelwoerister cc @nikomatsakis @wesleywiser
2019-02-15fix tests post-rebaseFelix S. Klock II-14/+14
2019-02-15make generalization code create new variables in correct universeNiko Matsakis-10/+46
In our type inference system, when we "generalize" a type T to become a suitable value for a type variable V, we sometimes wind up creating new inference variables. So, for example, if we are making V be some subtype of `&'X u32`, then we might instantiate V with `&'Y u32`. This generalized type is then related `&'Y u32 <: &'X u32`, resulting in a region constriant `'Y: 'X`. Previously, however, we were making these fresh variables like `'Y` in the "current universe", but they should be created in the universe of V. Moreover, we sometimes cheat in an invariant context and avoid creating fresh variables if we know the result must be equal -- we can only do that when the universes work out.
2019-02-15Auto merge of #58403 - eddyb:requalify, r=oli-obkbors-20/+20
rustc_mir: split qualify_consts' "value qualification" bitflags into separate computations. Prerequisite for computing those bits through a dataflow algorithm ~~(which I might do in this PR later)~~. This PR should not change behavior overall, other than treating `simd_shuffle*` identically to `#[rustc_args_required_const]` (maybe we should just have `#[rustc_args_required_const]` on the intrinsic imports of `simd_shuffle*`? cc @gnzlbg) cc @oli-obk @alexreg
2019-02-15compile-pass test for #53606Saleem Jaffer-0/+8
2019-02-15Always emit an error for a query cycleJohn Kåre Alsaker-14/+14
2019-02-14Add updated NLL testsvarkor-37/+108
2019-02-14add .stderr fileNiko Matsakis-0/+17
2019-02-14Update const fn testsvarkor-65/+202
2019-02-14Require defining uses to use generic parameters for all parameters of a ↵Oliver Scherer-23/+85
generic existential type
2019-02-14rustc_mir: split qualify_consts' checking and value qualification.Eduard-Mihai Burtescu-20/+20
2019-02-14Rollup merge of #58407 - euclio:upper-camel-case, r=estebankMazdak Farrokhzad-72/+44
specify "upper camel case" in style lint Also, fix an issue where internal upper case letters were converted to lower case. Fixes #57319.
2019-02-14Rollup merge of #58378 - alexcrichton:incremental-lto, r=michaelwoeristerMazdak Farrokhzad-0/+40
rustc: Implement incremental "fat" LTO Currently the compiler will produce an error if both incremental compilation and full fat LTO is requested. With recent changes and the advent of incremental ThinLTO, however, all the hard work is already done for us and it's actually not too bad to remove this error! This commit updates the codegen backend to allow incremental full fat LTO. The semantics are that the input modules to LTO are all produce incrementally, but the final LTO step is always done unconditionally regardless of whether the inputs changed or not. The only real incremental win we could have here is if zero of the input modules changed, but that's so rare it's unlikely to be worthwhile to implement such a code path. cc #57968 cc rust-lang/cargo#6643
2019-02-14Rollup merge of #58371 - davidtwco:issue-58299, r=arielb1Mazdak Farrokhzad-0/+50
Check user type annotations for range patterns. Fixes #58299. This PR builds on the fix from #58161 (which fixed miscompilation caused by the introduction of `AscribeUserType` patterns for associated constants) to start checking these patterns are well-formed for ranges (previous fix just ignored them so that miscompilation wouldn't occur). r? @arielb1
2019-02-14Rollup merge of #58347 - matthewjasper:closure-bounds-fixes, r=pnkfelixMazdak Farrokhzad-0/+40
Closure bounds fixes * Ensures that "nice region errors" are buffered so that they are sorted and migrated correctly. * Propagates fewer constraints for closures (cc #58178) * Propagate constraints from closures more precisely (#58127) Closes #58127 r? @nikomatsakis
2019-02-14Rollup merge of #58296 - estebank:hidden-suggestion, r=oli-obkMazdak Farrokhzad-31/+23
Hidden suggestion support Add way to hide suggestion snippet window from cli output to avoid cluttered spans that don't enhance understanding. r? @pietroalbini CC @zackmdavis
2019-02-14Rollup merge of #58267 - estebank:match-arms, r=matthewjasperMazdak Farrokhzad-43/+143
Tweak "incompatible match arms" error - Point at the body expression of the match arm with the type error. - Point at the prior match arms explicitly stating the evaluated type. - Point at the entire match expr in a secondary span, instead of primary. - For type errors in the first match arm, the cause is outside of the match, treat as implicit block error to give a more appropriate error. Fix #46776, fix #57206. CC #24157, #38234.
2019-02-14Rollup merge of #57992 - Matthias247:waker4, r=cramertjMazdak Farrokhzad-55/+90
Update the future/task API This change updates the future and task API as discussed in the stabilization RFC at https://github.com/rust-lang/rfcs/pull/2592. Changes: - Replacing UnsafeWake with RawWaker and RawWakerVtable - Removal of LocalWaker - Removal of Arc-based Wake trait
2019-02-14Rollup merge of #57451 - dlrobertson:can_use_as_ref_nit, r=estebankMazdak Farrokhzad-8/+8
suggestion-diagnostics: as_ref improve snippet Improve the code snippet suggested in suggestion-diagnostics when suggesting the use of as_ref. Given: ```rust fn test(x: &usize) {} fn main() { Some(42).map(|x| test(x)); } ``` Suggest ``` help: consider using `as_ref` instead: `as_ref().map` ``` Instead of ``` help: consider using `as_ref` instead: `as_ref().` ```
2019-02-13Check the self-type of inherent associated constantsMatthew Jasper-20/+58
2019-02-13Propagate region constraints more precisely from closuresMatthew Jasper-0/+40
2019-02-13specify "upper camel case" in style lintAndy Russell-72/+44
Also, fix an issue where internal upper case letters were converted to lower case.
2019-02-13suggestion-diagnostics: as_ref improve snippetDan Robertson-8/+8
Improve the code snippet suggested in suggestion-diagnostics when suggesting the use of as_ref.
2019-02-13Rollup merge of #58386 - Zoxc:fix-54242, r=michaelwoeristerMazdak Farrokhzad-0/+17
Fix #54242 r? @michaelwoerister
2019-02-13Rollup merge of #58381 - davidtwco:issue-42944, r=estebankMazdak Farrokhzad-12/+42
Only suggest imports if not imported. Fixes #42944 and fixes #53430. This commit modifies name resolution error reporting so that if a name is in scope and has been imported then we do not suggest importing it. This can occur when we add a label about constructors not being visible due to private fields. In these cases, we know that the struct/variant has been imported and we should silence any suggestions to import the struct/variant. r? @estebank
2019-02-13Rollup merge of #58354 - matthewjasper:mir-dump-fixes, r=wesleywiserMazdak Farrokhzad-0/+66
Fix ICE and invalid filenames in MIR printing code * Don't panic when printing MIR for associated constants * Don't use `<` and `>` in filenames, since they aren't allowed on Windows. r? @eddyb cc @RalfJung
2019-02-13Rollup merge of #58276 - varkor:missing-stability-attr-top-level, r=davidtwcoMazdak Farrokhzad-11/+26
Improve the error messages for missing stability attributes This makes the capitalisation consistent and provides more context (especially for missing top-level attributes).
2019-02-13Rollup merge of #58272 - fitzgen:num-format-code-size, r=Mark-SimulacrumMazdak Farrokhzad-0/+43
Cut down on number formating code size r? @alexcrichton
2019-02-13Rollup merge of #58202 - varkor:deprecated-future-external, r=GuillaumeGomezMazdak Farrokhzad-58/+109
Ignore future deprecations in #[deprecated] The future deprecation warnings should only apply to `#[rustc_deprecated]` as they take into account rustc's version. Fixes #57952. I've also slightly modified rustdoc's display of future deprecation notices to make it more consistent, so I'm assigning a rustdoc team member for review to make sure this is okay. r? @GuillaumeGomez
2019-02-13Stabilize TryFrom and TryIntoSimon Sapin-6/+4
2019-02-13Use convert::Infallible instead of never in the blanket TryFrom implSimon Sapin-2/+2
2019-02-13Relax some Hash bounds on HashMap<K, V, S> and HashSet<T, S>Anthony Ramine-10/+11
Notably, hash iterators don't require any trait bounds to be iterated.
2019-02-12Merging masterMatthias Einwag-1168/+2227
2019-02-13Rollup merge of #58387 - alexreg:fix-trait-alias-2, r=centrilMazdak Farrokhzad-0/+21
Disallow `auto` trait alias syntax See https://github.com/rust-lang/rust/issues/41517#issuecomment-462567679. r? @Centril CC @topecongiro @nikomatsakis
2019-02-13Rollup merge of #58166 - euclio:deprecation-shorthand, r=petrochenkovMazdak Farrokhzad-4/+39
allow shorthand syntax for deprecation reason Fixes #48271. Created based on discussion in #56896.
2019-02-13Rollup merge of #58057 - michaelwoerister:stabilize-xlto, r=alexcrichtonMazdak Farrokhzad-12/+12
Stabilize linker-plugin based LTO (aka cross-language LTO) This PR stabilizes [linker plugin based LTO](https://github.com/rust-lang/rust/issues/49879), also known as "cross-language LTO" because it allows for doing inlining and other optimizations across language boundaries in mixed Rust/C/C++ projects. As described in the tracking issue, it works by making `rustc` emit LLVM bitcode instead of machine code, the same as `clang` does. A linker with the proper plugin (like LLD) can then run (Thin)LTO across all modules. The feature has been implemented over a number of pull requests and there are various [codegen](https://github.com/rust-lang/rust/blob/master/src/test/codegen/no-dllimport-w-cross-lang-lto.rs) and [run](https://github.com/rust-lang/rust/tree/master/src/test/run-make-fulldeps/cross-lang-lto-clang)-[make](https://github.com/rust-lang/rust/tree/master/src/test/run-make-fulldeps/cross-lang-lto-upstream-rlibs) [tests](https://github.com/rust-lang/rust/tree/master/src/test/run-make-fulldeps/cross-lang-lto) that make sure that it keeps working. It also works for building big projects like [Firefox](https://treeherder.mozilla.org/#/jobs?repo=try&revision=2ce2d5ddcea6fbff790503eac406954e469b2f5d). The PR makes the feature available under the `-C linker-plugin-lto` flag. As discussed in the tracking issue it is not cross-language specific and also not LLD specific. `-C linker-plugin-lto` is descriptive of what it does. If someone has a better name, let me know `:)`
2019-02-12Auto merge of #58051 - SimonSapin:str_escape, r=alexcrichtonbors-3/+0
Stabilize str::escape_* methods with new return types… … that implement `Display` and `Iterator<Item=char>`, as proposed in FCP: https://github.com/rust-lang/rust/issues/27791#issuecomment-376864727
2019-02-12Auto merge of #58341 - alexreg:cosmetic-2-doc-comments, r=steveklabnikbors-34/+36
Cosmetic improvements to doc comments This has been factored out from https://github.com/rust-lang/rust/pull/58036 to only include changes to documentation comments (throughout the rustc codebase). r? @steveklabnik Once you're happy with this, maybe we could get it through with r=1, so it doesn't constantly get invalidated? (I'm not sure this will be an issue, but just in case...) Anyway, thanks for your advice so far!
2019-02-12respect alternate flag when formatting impl traitAndy Russell-0/+5
2019-02-12Check user type annotations for range patterns.David Wood-0/+50
This commit builds on the fix from #58161 (which fixed miscompilation caused by the introduction of `AscribeUserType` patterns for associated constants) to start checking these patterns are well-formed for ranges (previous fix just ignored them so that miscompilation wouldn't occur).
2019-02-12Added tests.Alexander Regueiro-0/+21
2019-02-12Stabilize linker-plugin based LTO.Michael Woerister-12/+12
2019-02-12rustc: Implement incremental "fat" LTOAlex Crichton-0/+40
Currently the compiler will produce an error if both incremental compilation and full fat LTO is requested. With recent changes and the advent of incremental ThinLTO, however, all the hard work is already done for us and it's actually not too bad to remove this error! This commit updates the codegen backend to allow incremental full fat LTO. The semantics are that the input modules to LTO are all produce incrementally, but the final LTO step is always done unconditionally regardless of whether the inputs changed or not. The only real incremental win we could have here is if zero of the input modules changed, but that's so rare it's unlikely to be worthwhile to implement such a code path. cc #57968 cc rust-lang/cargo#6643
2019-02-12Auto merge of #58098 - oli-obk:maybe_allow_internal_unstable, r=petrochenkovbors-16/+16
Require a list of features in `#[allow_internal_unstable]` The blanket-permission slip is not great and will likely give us trouble some point down the road.
2019-02-12Stabilize str::escape_* methodsSimon Sapin-3/+0
FCP: https://github.com/rust-lang/rust/issues/27791#issuecomment-376864727
2019-02-12Auto merge of #57388 - euclio:runmake-explicit-ignore, r=kennytmbors-297/+118
use ignore directives for run-make tests This makes the tests easier to read, and makes it possible to tell which tests aren't being run on the host platform. Fixes #56704.
2019-02-12Set the query in the ImplicitCtxt before trying to mark it greenJohn Kåre Alsaker-0/+17
2019-02-12Auto merge of #58246 - pmccarter:master, r=oli-obkbors-0/+34
Make `saturating_add` and `saturating_sub` `const` functions Fixes #58030
2019-02-12Auto merge of #58180 - davidtwco:issue-58053, r=estebankbors-0/+34
Fix span for closure return type when annotated. Fixes #58053. This PR adjusts the span used to label closure return types so that if the user specifies the return type, i.e. `|_| -> X {}` instead of `|_| {}`, we correctly highlight all of it and not just the last character. r? @pnkfelix