about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2018-12-21Fix alignment for array indexingNikita Popov-0/+80
We need to reduce the alignment with the used offset. If the offset isn't known, we need to reduce with the element size to support arbitrary offsets.
2018-12-21Stabilize #[repr(packed(N))]Taylor Cramer-73/+16
2018-12-21Update tests to changes on masterOliver Scherer-2/+10
2018-12-21Also test projectionsOliver Scherer-1/+18
2018-12-21Fix a recently introduces regressionOliver Scherer-5/+43
2018-12-21Auto merge of #55798 - GuillaumeGomez:version-display-associated-const, ↵bors-2/+28
r=QuietMisdreavus Add version display for associated consts Fixes #54030. <img width="1440" alt="screenshot 2018-11-08 at 23 57 29" src="https://user-images.githubusercontent.com/3050060/48232648-99decf00-e3b2-11e8-9f41-6bd12a161c7d.png"> r? @QuietMisdreavus
2018-12-20Point at coercion source on type errors for fn returning `impl Trait`Esteban Küber-0/+3
2018-12-21Enable emission of alignment attrs for pointer paramsNikita Popov-16/+16
Instead disable creation of assumptions during inlining using an LLVM opt flag. The -Z arg-align-attributes option which previously controlled this behavior is removed.
2018-12-20Auto merge of #54125 - varkor:less-conservative-uninhabitedness-check, ↵bors-77/+75
r=nikomatsakis Less conservative uninhabitedness check Extends the uninhabitedness check to structs, non-empty enums, tuples and arrays. Pulled out of #47291 and #50262. Fixes https://github.com/rust-lang/rust/issues/54586. r? @nikomatsakis
2018-12-20Point to return span when writing `return;` on non-() fnEsteban Küber-3/+9
2018-12-20Auto merge of #56845 - GuillaumeGomez:const-docs, r=oli-obkbors-0/+43
Don't render const keyword on stable Fixes #55246. Continuation of #55327. r? @oli-obk
2018-12-20Remove nil-enum testvarkor-24/+0
2018-12-20display rustc_private APIs as "Internal"Andy Russell-0/+10
2018-12-20split extra_scripts to handle root_path shenanigansQuietMisdreavus-0/+6
2018-12-20new --static-root-path flag for controlling static file locationsQuietMisdreavus-0/+18
2018-12-20CopyriteOliver Scherer-10/+0
2018-12-20Auto merge of #56647 - petrochenkov:dcrate2, r=alexcrichtonbors-2/+355
Rework treatment of `$crate` in procedural macros Important clarification: `$crate` below means "processed `$crate`" or "output `$crate`". In the input of a decl macro `$crate` is just two separate tokens, but in the *output of a decl macro* `$crate` is a single keyword identifier (https://github.com/rust-lang/rust/issues/55640#issuecomment-435692791). First of all, this PR removes the `eliminate_crate_var` hack. `$crate::foo` is no longer replaced with `::foo` or `::crate_name::foo` in the input of derive proc macros, it's passed to the macro instead with its precise span and hygiene data, and can be treated as any other path segment keyword (like `crate` or `self`) after that. (Note: `eliminate_crate_var` was never used for non-derive proc macros.) This creates an annoying problem - derive macros still may stringify their input before processing and expect `$crate` survive that stringification and refer to the same crate (the Rust 1.15-1.29 way of doing things). Moreover, the input of proc macro attributes and derives (but not fn-like proc macros) also effectively survives stringification before being passed to the macro (also for legacy implementation reasons). So we kind of resurrect the `eliminate_crate_var` hack in reduced form, but apply it only to AST pretty-printing. If an AST fragment is pretty-printed, the resulting *text* will have `$crate` replaced with `crate` or `::crate_name`. This should be enough to keep all the legacy cases working. Closes https://github.com/rust-lang/rust/issues/55640 Closes https://github.com/rust-lang/rust/issues/56622 r? @ghost
2018-12-20Auto merge of #56741 - RalfJung:retag-to-raw, r=oli-obkbors-1/+1
treat ref-to-raw cast like a reborrow: do a special kind of retag r? @oli-obk Cc @nikomatsakis
2018-12-20Add test for associated const version displayGuillaume Gomez-0/+26
2018-12-20Auto merge of #56649 - davidtwco:issue-46589, r=pnkfelixbors-31/+57
MIR borrowck doesn't accept the example of iterating and updating a mutable reference Fixes #46589. r? @pnkfelix or @nikomatsakis
2018-12-20Refactor and add comments to code in receiver_is_validMichael Hewson-12/+12
also updated some error messages removed the code manually checking for `receiver_ty: Deref<Target=self_ty>`, in favour of using autoderef but only doing one iteration. This will cause error messages to be more consistent. Before, a "mismatched method receiver" error would be emitted when `receiver_ty` was valid except for a lifetime parameter, but only when `feature(arbitrary_self_types)` was enabled, and without the feature flag the error would be "uncoercible receiver". Now it emits "mismatched method receiver" in both cases.
2018-12-20Stabilize `Rc`, `Arc` and `Pin` as method receiversMichael Hewson-40/+73
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.
2018-12-20Auto merge of #56219 - arielb1:never-coerce-box, r=nikomatsakisbors-0/+62
trigger unsized coercions keyed on Sized bounds This PR causes unsized coercions to not be disabled by `$0: Unsize<dyn Object>` coercion obligations when we have an `$0: Sized` obligation somewhere. This should be mostly backwards-compatible, because in these cases not doing the unsize coercion should have caused the `$0: Sized` obligation to fail. Note that `X: Unsize<dyn Object>` obligations can't fail *as obligations* if `X: Sized` holds, so this still maintains some version of monotonicity (I think that an unsized coercion can't be converted to no coercion by unifying type variables). Fixes #49593 (unblocking never_type). r? @eddyb cc @nikomatsakis
2018-12-19Auto merge of #54252 - arielb1:deref-query, r=nikomatsakisbors-0/+34
process nested obligations in autoderef Fixes #53843. r? @nikomatsakis
2018-12-19suggest similar lint names for unknown lintsAndy Russell-24/+35
2018-12-20Workaround issues with crate loading during cross-compilationVadim Petrochenkov-3/+9
2018-12-19Do not interpret mismatches from pretty-printed `$crate` as token stream ↵Vadim Petrochenkov-58/+44
invalidation
2018-12-19Reintroduce special pretty-printing for `$crate` when it's necessary for ↵Vadim Petrochenkov-10/+343
proc macros
2018-12-19proc_macro: Accept `$crate` as an identifier if it comes from the compilerVadim Petrochenkov-0/+28
2018-12-19test: Ignore ui/target-feature-gate on sparc and sparc64John Paul Adrian Glaubitz-1/+3
2018-12-19test: Ignore ui/target-feature-gate on powerpc and powerpc64(le)John Paul Adrian Glaubitz-1/+4
2018-12-19Rollup merge of #56947 - hsivonen:neon, r=alexcrichtonPietro Albini-0/+2
Add targets thumbv7neon-linux-androideabi and thumbv7neon-unknown-linux-gnueabihf These two targets enable both thumb-mode and NEON for ARMv7 CPUs. This another attempt at #49902, which cannot be reopened. Between that PR and this one, some subrepos with C code whose build systems were failing went away.
2018-12-19Rollup merge of #56910 - estebank:unclosed-eof, r=oli-obkPietro Albini-0/+19
Do not point at delim spans for complete correct blocks Fix #56834.
2018-12-19Rollup merge of #56908 - alexcrichton:new-features, r=oli-obkPietro Albini-1/+4
rustc: Don't ICE on usage of two new target features I seem to always forget to update this portion of the compiler...
2018-12-19Rollup merge of #56907 - rumajo:master, r=kennytm,CentrilPietro Albini-4/+4
Fix grammar in compiler error for array iterators This fixes a small grammatical mistake in the message the compiler gives when attempting to iterate directly over an array `arr` without calling `arr.iter()` or borrowing `&arr`.
2018-12-19Rollup merge of #56772 - ↵Pietro Albini-0/+5
pnkfelix:issue-54153-linkage-sometimes-requires-optimizations, r=nikic fix issue 54153 by not testing issue-18804 on Windows nor OS X. Fix #54153
2018-12-19Rollup merge of #56689 - QuietMisdreavus:rustdoc-lint-group, r=pnkfelixPietro Albini-0/+78
add a lint group for lints emitted by rustdoc As rustdoc adds more lints that it specifically manages, it would be nice to be able to lump them all together. This gives us a new group just for that. I deliberately didn't include `missing_docs` because this is kind of a stepping stone for moving our lints into tool lints (i.e. `#![warn(rustdoc::private_doc_tests)]`), since all of these are specifically emitted by rustdoc. If we want to move `missing_docs` out of the compiler, that's also an option, but it would create a surprising change of behavior. I also took the chance to rewrite the lint descriptions of these lints to better match the style of the other lints. `>_>`
2018-12-19Set constness correctlyGuillaume Gomez-4/+4
2018-12-19FIXME(2665) remove fixme since the c files are included by the testsuiteNiv Kaminer-5/+1
2018-12-19FIXME(45992) remove fixme since the lint is being testedNiv Kaminer-1/+0
2018-12-19FIXME(31702) remove fixme, move auxiliaries to the right place and fix ↵Niv Kaminer-6/+1
hr_lifetime_in_assoc_type warning
2018-12-19FIXME(21232) update fixme to point to the open issue about accepting partial ↵Niv Kaminer-1/+1
initialization
2018-12-19FIXME(49824) remove fixme because there is no free region error anymoreNiv Kaminer-6/+5
2018-12-19FIXME(49821) remove fixme since a tip about let binding is givenNiv Kaminer-4/+2
2018-12-19FIXME(45827) remove comment since errors are reportedNiv Kaminer-12/+6
2018-12-19Auto merge of #56397 - petrhosek:file-search, r=cramertjbors-0/+27
Search other library paths when loking for link objects Support the case when link objects are not located in Rust sysroot but in other locations which could be specify through library paths.
2018-12-19fixed test, now it doesn't use a fundemental typeOzaren-4/+5
i.e. `Box`, instead it now uses `Vec`
2018-12-18added test to show motivation for modified TryFrom implOzaren-0/+43
2018-12-18Remove no longer working testAlex Crichton-181/+0
2018-12-18Search other library paths when loking for link objectsPetr Hosek-0/+27
Support the case when link objects are not located in Rust sysroot but in other locations which could be specify through library paths.