about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2018-12-26Expanded tests for enum variants with generic args.Alexander Regueiro-139/+419
2018-12-26Added tests for enums & enum aliases with various combinations of generic args.Alexander Regueiro-0/+139
2018-12-26Fixed issues raised in first review.Alexander Regueiro-46/+4
2018-12-26Fixed more tests.Alexander Regueiro-90/+164
2018-12-26Fixed tests.Alexander Regueiro-10/+19
2018-12-26Added tests for feature.Alexander Regueiro-0/+146
2018-12-26Store `Ident` rather than just `Name` in HIR types `Item` and `ForeignItem`.Alexander Regueiro-4/+56
2018-12-26Add closure cannot be moved note.David Wood-0/+6
This commit extends existing logic for checking whether a closure that is `FnOnce` and therefore moves variables that it captures from the environment has already been invoked when being invoked again. Now, this logic will also check whether the closure is being moved after previously being moved or invoked and add an appropriate note.
2018-12-26Add union justifications to conflicting borrows.David Wood-117/+93
This commit adds justifications to error messages for conflicting borrows of union fields. Where previously an error message would say ``cannot borrow `u.b` as mutable..``, it now says ``cannot borrow `u` (via `u.b`) as mutable..``.
2018-12-26Remove the private generic NonZero<T> wrapper type.Simon Sapin-2/+0
Instead, use `#[rustc_layout_scalar_valid_range_start(1)]` directly on relevant libcore types.
2018-12-25Remove licensesMark Rousskov-112085/+14378
2018-12-25Auto merge of #57088 - euclio:non-camel-case-early-lint, r=estebankbors-853/+868
make non_camel_case_types an early lint This allows us to catch these kinds of style violations much earlier, as evidenced by the large number of tests that had to be updated for this change.
2018-12-25Auto merge of #56962 - nivkner:fixme_fixup4, r=pnkfelixbors-39/+20
address some FIXME whose associated issues were marked as closed part of #44366
2018-12-25Revert "Rollup merge of #56944 - alexcrichton:less-thin2, r=michaelwoerister"kennytm-0/+181
This reverts commit f1051b574c26e20608ff26415a3dddd13f140925, reversing changes made to 833e0b3b8a9f1487a61152ca76f7f74a6b32cc0c.
2018-12-24make non_camel_case_types an early lintAndy Russell-853/+868
2018-12-24Add no-crate filter option on rustdocGuillaume Gomez-0/+16
2018-12-24Rollup merge of #57021 - nikic:arg-pointer-align, r=nagisaMazdak Farrokhzad-16/+16
Enable emission of alignment attrs for pointer params Instead disable creation of assumptions during inlining using an LLVM opt flag. For non-inlined functions, this gives us alignment information, while not inserting any assumes that kill other optimizations. The `-Z arg-align-attributes` option which previously controlled this behavior is removed. Fixes #54982. r? @nagisa cc @eddyb who added the current behavior, and @scottmcm, who added the `-Z arg-align-attributes` flag.
2018-12-24Rollup merge of #56944 - alexcrichton:less-thin2, r=michaelwoeristerMazdak Farrokhzad-181/+0
bootstrap: Link LLVM as a dylib with ThinLTO When building a distributed compiler on Linux where we use ThinLTO to create the LLVM shared object this commit switches the compiler to dynamically linking that LLVM artifact instead of statically linking to LLVM. The primary goal here is to reduce CI compile times, avoiding two+ ThinLTO builds of all of LLVM. By linking dynamically to LLVM we'll reuse the one ThinLTO step done by LLVM's build itself. Lots of discussion about this change can be found [here] and down. A perf run will show whether this is worth it or not! [here]: https://github.com/rust-lang/rust/pull/53245#issuecomment-417015334
2018-12-23Rollup merge of #57078 - glaubitz:ignore-tests, r=nikicMazdak Farrokhzad-1/+3
Ignore two tests on s390x Ignore two tests on s390x which don't make sense on s390x as they are x86-specific.
2018-12-23Rollup merge of #57067 - Centril:stabilize-min_const_unsafe_fn, r=oli-obkMazdak Farrokhzad-148/+76
Stabilize min_const_unsafe_fn in 1.33 Fixes #55607 r? @oli-obk
2018-12-23Rollup merge of #57053 - nikic:fix-gep-align, r=nagisaMazdak Farrokhzad-0/+80
Fix alignment for array indexing We need to reduce the alignment with the used offset. If the offset isn't known, use the element size, as this will yield the minimum possible alignment. This handles both direct array indexing, and array repeat expressions. Fixes #56927. r? @nagisa
2018-12-23Rollup merge of #57020 - estebank:return-span, r=zackmdavisMazdak Farrokhzad-3/+12
Point to cause of `fn` expected return type Fix #48136.
2018-12-23Rollup merge of #56966 - varkor:raw-pointer-deref-parens, r=zackmdavisMazdak Farrokhzad-3/+41
Correct strings for raw pointer deref and array access suggestions Fixes https://github.com/rust-lang/rust/issues/56714. Fixes https://github.com/rust-lang/rust/issues/56963. r? @zackmdavis
2018-12-23Rollup merge of #56953 - oli-obk:dead_const, r=petrochenkovMazdak Farrokhzad-0/+12
Mark tuple structs as live if their constructors are used fixes https://github.com/rust-lang/rust/issues/56281
2018-12-23Rollup merge of #56939 - cramertj:pin-stabilization, r=alexcrichtonMazdak Farrokhzad-5/+5
Pin stabilization This implements the changes suggested in https://github.com/rust-lang/rust/issues/55766#issue-378417538 and stabilizes the `pin` feature. @alexcrichton also listed several "blockers" in that issue, but then in [this comment](https://github.com/rust-lang/rust/issues/55766#issuecomment-445074980) mentioned that they're more "TODO items": > In that vein I think it's fine for a stabilization PR to be posted at any time now with FCP lapsed for a week or so now. The final points about self/pin/pinned can be briefly discussed there (if even necessary, they could be left as the proposal above). Let's settle these last bits here and get this thing stabilized! :) r? @alexcrichton cc @withoutboats
2018-12-23Rollup merge of #56916 - oli-obk:static_mut_beta_regression, r=davidtwcoMazdak Farrokhzad-5/+68
Fix mutable references in `static mut` fixes #56903
2018-12-23Rollup merge of #56188 - zackmdavis:if_i_may_suggest, r=davidtwcoMazdak Farrokhzad-40/+94
enum type instead of variant suggestion unification Fixes #56028. Weirdly, we were deciding between a help note and a structured suggestion based on whether the import candidate span was a dummy—but we weren't using that span in any case! The dummy-ness of the span (which appears to be a matter of this-crate vs. other-crate definition) isn't the right criterion by which we should decide whether it's germane to mention that "there is an enum variant"; instead, let's use the someness of `def` (which is used as the `has_unexpected_resolution` argument to `error_code`). Since `import_candidate_to_paths` has no other callers, we are free to stop returning the span and rename the function. By using `span_suggestions_`, we leverage the max-suggestions output limit already built in to the emitter, thus resolving #56028. In the matter of message wording, "you can" is redundant (and perhaps too informal); prefer the imperative. In a second commit, we do some unprincipled special-casing to correct and beautify suggestions for `Option` and `Result` (where the existing code was being confused by their being reexported in the prelude). r? @davidtwco
2018-12-23test: Ignore codegen/x86_mmx.rs on s390xJohn Paul Adrian Glaubitz-0/+1
2018-12-23test: Ignore ui/target-feature-gate on s390xJohn Paul Adrian Glaubitz-1/+2
2018-12-23stabilize min_const_unsafe_fn -- revert const-size_of-cycle changesMazdak Farrokhzad-0/+4
2018-12-23stabilize min_const_unsafe_fn --bless tests.Mazdak Farrokhzad-16/+12
2018-12-23stabilize min_const_unsafe_fn in 1.33.Mazdak Farrokhzad-141/+69
2018-12-23bless ui tests in compare modeNiv Kaminer-4/+4
2018-12-22adjust enum type instead of variant suggestions for prelude enumsZack M. Davis-14/+10
The present author regrets not thinking of a more eloquent way to do this.
2018-12-22enum type instead of variant suggestion unificationZack M. Davis-36/+94
Weirdly, we were deciding between a help note and a structured suggestion based on whether the import candidate span was a dummy—but we weren't using that span in any case! The dummy-ness of the span (which appears to be a matter of this-crate vs. other-crate definition) isn't the right criterion by which we should decide whether it's germane to mention that "there is an enum variant"; instead, let's use the someness of `def` (which is used as the `has_unexpected_resolution` argument to `error_code`). Since `import_candidate_to_paths` has no other callers, we are free to stop returning the span and rename the function. By using `span_suggestions_`, we leverage the max-suggestions output limit already built in to the emitter, thus resolving #56028. In the matter of message wording, "you can" is redundant (and perhaps too informal); prefer the imperative.
2018-12-22Auto merge of #57063 - kennytm:rollup, r=kennytmbors-155/+156
Rollup of 25 pull requests Successful merges: - #56802 (Add DoubleEndedIterator::nth_back) - #56909 (static eval: Do not ICE on layout size overflow) - #56914 (Ignore ui/target-feature-gate on sparc, sparc64, powerpc, powerpc64 and powerpc64le) - #56919 (Remove a wrong multiplier on relocation offset computation) - #56933 (Add --progress to git submodule commands in x.py) - #56936 (rename div_euc -> div_euclid, and mod_euc -> rem_euclid) - #56941 (deny intra-doc link resolution failures in libstd) - #56945 (Fix rustdoc-js tests) - #56967 (Replace current crate's searchIndex when regenerating) - #56970 (Mem uninit doc ptr drop) - #56973 (make basic CTFE tracing available on release builds) - #56979 (Adding unwinding support for x86_64_fortanix_unknown_sgx target.) - #56981 (miri: allocation is infallible) - #56984 (A few tweaks to dropck_outlives) - #56989 (Fix compiletest `trim` deprecation warnings) - #56992 (suggest similar lint names for unknown lints) - #57002 (Stabilize Vec(Deque)::resize_with) - #57011 (rustdoc: add new CLI flag to load static files from a different location) - #57027 (Optimize away a move) - #57034 (Inline tweaks) - #57039 (Update migrate warning wording.) - #57040 (Fix feature gate to point to 1.32.0 for `path_from_str`) - #57049 (Stabilize #[repr(packed(N))]) - #57050 (Fixed typo in HashMap documentation) - #57052 (Fix stabilization version numbers (exhaustive_integer_patterns + macro_literal_matcher))
2018-12-22Auto merge of #56887 - emilio:enum-field-reordering, r=eddybbors-24/+30
Disable field reordering for repr(int). This fixes the problem that the test in #56619 uncovers. Closes #56619.
2018-12-23Rollup merge of #57039 - davidtwco:migrate-warning-wording, r=pnkfelixkennytm-57/+44
Update migrate warning wording. This PR modifies the wording of the warning for backwards-incompatible changes in migrate mode. The warning messages are changed to be lowercase and not include line-breaks in order to be consistent with other compiler diagnostics.
2018-12-23Rollup merge of #57049 - cramertj:repr-packed, r=Centrilkennytm-73/+16
Stabilize #[repr(packed(N))] Fixes https://github.com/rust-lang/rust/issues/33158
2018-12-23Rollup merge of #57011 - QuietMisdreavus:static-root-path, r=GuillaumeGomezkennytm-0/+24
rustdoc: add new CLI flag to load static files from a different location This PR adds a new CLI flag to rustdoc, `--static-root-path`, which controls how rustdoc links pages to the CSS/JS/font static files bundled with the output. By default, these files are linked with a series of `../` which is calculated per-page to link it to the documentation root - i.e. a relative link to the directory given by `-o`. This is causing problems for docs.rs, because even though docs.rs has saved one copy of these files and is dispatching them dynamically, browsers have no way of knowing that these are the same files and can cache them. This can allow it to link these files as, for example, `/rustdoc.css` instead of `../../rustdoc.css`, creating a single location that the files are loaded from. I made sure to only change links for the *static* files, those that don't change between crates. Files like the search index, aliases, the source files listing, etc, are still linked with relative links. r? @GuillaumeGomez cc @onur
2018-12-23Rollup merge of #56992 - euclio:unknown-lint-suggestion, r=oli-obkkennytm-24/+35
suggest similar lint names for unknown lints Fixes #54737.
2018-12-23Rollup merge of #56919 - oli-obk:null_ref_array_tuple, r=RalfJungkennytm-0/+9
Remove a wrong multiplier on relocation offset computation r? @RalfJung fixes #56800
2018-12-23Rollup merge of #56914 - glaubitz:ignore-tests, r=alexcrichtonkennytm-1/+6
Ignore ui/target-feature-gate on sparc, sparc64, powerpc, powerpc64 and powerpc64le The test ui/target-feature-gate is not applicable on sparc, sparc64, powerpc, powerpc64 and powerpc64le and consequently fails there. So just ignore it on these targets.
2018-12-23Rollup merge of #56909 - dlrobertson:fix_56762, r=estebankkennytm-0/+22
static eval: Do not ICE on layout size overflow Layout size overflow and typeck eval errors are reported. Trigger a bug only when the eval error is strictly labeled as TooGeneric. Fixes: #56762
2018-12-22Update migrate warning wording.David Wood-57/+44
This commit modifies the wording of the warning for backwards-incompatible changes in migrate mode. The warning messages are changed to be lowercase and not include line-breaks in order to be consistent with other compiler diagnostics.
2018-12-22Auto merge of #56862 - arielb1:fundamentally-clean, r=nikomatsakisbors-0/+34
stop treating trait objects from #[fundamental] traits as fundamental This is a [breaking-change] to code that exploits this functionality (which should be limited to code using `#![feature(fundamental)]`. Fixes #56503. r? @nikomatsakis
2018-12-21Rename Box/Arc/Rc::pinned to ::pinTaylor Cramer-1/+1
2018-12-21Stabilize PinTaylor Cramer-4/+4
2018-12-22Auto merge of #56824 - euclio:internal-apis, r=QuietMisdreavusbors-10/+40
rustdoc: display rustc_private APIs as "Internal" This PR updates the display of `rustc_private` APIs to be "Internal" instead of "Experimental", and changes the colors appropriately. It also updates the copy of the `rustc_private` feature to sound more informative and less like a compiler suggestion. The PR additionally contains a significant refactor of the `short_stability` function to remove duplication and fix a few rendering bugs due to extra or missing spaces. Before: ![screen shot 2018-12-14 at 11 45 28 am](https://user-images.githubusercontent.com/1372438/50015926-c9768d80-ff95-11e8-9649-5df29df6909b.png) After: ![screen shot 2018-12-14 at 11 45 11 am](https://user-images.githubusercontent.com/1372438/50015934-cf6c6e80-ff95-11e8-912b-74b893f55425.png)
2018-12-22Auto merge of #56805 - mikeyhew:stabilize-pin-as-receiver, r=nikomatsakisbors-52/+85
Stabilize `Rc`, `Arc` and `Pin` as method receivers Replaces #55880 Closes #55786 r? @nikomatsakis cc @withoutboats @cramertj This lets you write methods using `self: Rc<Self>`, `self: Arc<Self>`, `self: Pin<&mut Self>`, `self: Pin<Box<Self>`, and other combinations involving `Pin` and another stdlib receiver type, without needing the `arbitrary_self_types`. Other user-created receiver types can be used, but they still require the feature flag to use. This is implemented by introducing a new trait, `Receiver`, which the method receiver's type must implement if the `arbitrary_self_types` feature is not enabled. To keep composed receiver types such as `&Arc<Self>` unstable, the receiver type is also required to implement `Deref<Target=Self>` when the feature flag is not enabled. This lets you use `self: Rc<Self>` and `self: Arc<Self>` in stable Rust, which was not allowed previously. It was agreed that they would be stabilized in #55786. `self: Pin<&Self>` and other pinned receiver types do not require the `arbitrary_self_types` feature, but they cannot be used on stable because `Pin` still requires the `pin` feature.