summary refs log tree commit diff
path: root/src/test/run-pass
AgeCommit message (Collapse)AuthorLines
2018-06-08Deduplicate and fix a testOliver Schneider-48/+11
2018-06-08Revert "Auto merge of #49719 - mark-i-m:no_sep, r=petrochenkov"Pietro Albini-6/+23
This reverts commit d6ba1b9b021c408fcad60ee52acf8af5e1b2eb00, reversing changes made to 8de5353f75dcde04abe947e0560dc5edd861cf3a.
2018-06-03Make sure the float comparison output is consistent with the expectedkennytm-0/+65
behavior when NaN is involved.
2018-05-21Fix `fn main() -> impl Trait` for non-`Termination` traitleonardo.yvens-0/+13
Fixes #50595. This bug currently affects stable. Why I think we can go for hard error: - It will in stable for at most one cycle and there is no legitimate reason to abuse it, nor any known uses in the wild. - It only affects `bin` crates (which have a `main`), so there is little practical difference between a hard error or a deny lint, both are a one line fix. The fix was to just unshadow a variable. Thanks @nikomatsakis for the mentoring! r? @nikomatsakis
2018-05-15Fix self referential impl Trait substitutionsleonardo.yvens-0/+29
A high impact bug because a lot of common traits use a `Self` substitution by default. Should be backported to beta. There was a check for this which wasn't catching all cases, it was made more robust. Fixes #49376 Fixes #50626 r? @petrochenkov
2018-05-14rustc: don't trip an assertion for enums with present but uninhabited variants.Eduard-Mihai Burtescu-0/+15
2018-05-13rustc: leave space for fields of uninhabited types to allow partial ↵Eduard-Mihai Burtescu-4/+69
initialization.
2018-05-04Make extern_absolute_paths only work on the new editionManish Goregaokar-1/+2
2018-05-04Auto merge of #50435 - cuviper:rm-lookup_host, r=sfacklerbors-4/+2
Remove the deprecated std::net::{lookup_host,LookupHost} These are unstable, and were deprecated by #47510, since Rust 1.25. The internal `sys` implementations are still kept to support the call in the common `resolve_socket_addr`.
2018-05-04Auto merge of #50409 - KiChjang:issue-50343, r=nikomatsakisbors-0/+17
Skip checking for unused mutable locals that have no name Fixes #50343.
2018-05-03Remove the deprecated std::net::{lookup_host,LookupHost}Josh Stone-4/+2
These are unstable, and were deprecated by #47510, since Rust 1.25. The internal `sys` implementations are still kept to support the call in the common `resolve_socket_addr`.
2018-05-03Auto merge of #50413 - kennytm:rollup, r=kennytmbors-0/+27
Rollup of 12 pull requests Successful merges: - #50302 (Add query search order check) - #50320 (Fix invalid path generation in rustdoc search) - #50349 (Rename "show type declaration" to "show declaration") - #50360 (Clarify wordings of the `unstable_name_collision` lint.) - #50365 (Use two vectors in nearest_common_ancestor.) - #50393 (Allow unaligned reads in constants) - #50401 (Revert "Implement FromStr for PathBuf") - #50406 (Forbid constructing empty identifiers from concat_idents) - #50407 (Always inline simple BytePos and CharPos methods.) - #50416 (check if the token is a lifetime before parsing) - #50417 (Update Cargo) - #50421 (Fix ICE when using a..=b in a closure.) Failed merges:
2018-05-03Fix issue #50415.kennytm-0/+27
2018-05-03Auto merge of #50030 - flip1995:rfc2103, r=petrochenkovbors-0/+23
Implement tool_attributes feature (RFC 2103) cc #44690 This is currently just a rebased and compiling (hopefully) version of #47773. Let's see if travis likes this. I will add the implementation for `tool_lints` this week.
2018-05-02Skip checking for unused mutable locals that have no nameKeith Yeung-0/+17
2018-05-02Auto merge of #50354 - varkor:initial-field-alignment-c-int, r=eddybbors-0/+55
Correct initial field alignment for repr(C)/repr(int) Fixes #50098 following https://github.com/rust-lang/rust/issues/50098#issuecomment-385497333. (I wasn't sure which kind of test was best suited here — I picked run-pass simply because that was convenient, but if codegen is more appropriate, let me know and I'll change it.) r? @eddyb
2018-05-02Add tests for a new feature 'tool_attributes'Seiichi Uchida-0/+23
2018-05-01Auto merge of #49982 - petrochenkov:noreex, r=alexcrichtonbors-85/+0
Remove unstable `macro_reexport` It's subsumed by `feature(use_extern_macros)` and `pub use` cc https://github.com/rust-lang/rust/issues/35896 closes https://github.com/rust-lang/rust/issues/29638 closes https://github.com/rust-lang/rust/issues/38951
2018-05-01Add repr(u8) to the testvarkor-0/+16
2018-05-01Correct initial field alignment for repr(C)/repr(int)varkor-0/+39
2018-05-01Auto merge of #49789 - petrochenkov:prelext, r=nikomatsakisbors-0/+21
Module experiments: Add one more prelude layer for extern crate names passed with `--extern` Implements one item from https://internals.rust-lang.org/t/the-great-module-adventure-continues/6678/183 When some name is looked up in lexical scope (`name`, i.e. not module-relative scope `some_mod::name` or `::name`), it's searched roughly in the next order: - local variables - items in unnamed blocks - items in the current module - :sparkles: NEW! :sparkles: crate names passed with `--extern` ("extern prelude") - standard library prelude (`Vec`, `drop`) - language prelude (built-in types like `u8`, `str`, etc) The last two layers contain a limited set of names controlled by us and not arbitrary user-defined names like upper layers. We want to be able to add new names into these two layers without breaking user code, so "extern prelude" names have higher priority than std prelude and built-in types. This is a one-time breaking change, that's why it would be nice to run this through crater. Practical impact is expected to be minimal though due to stylistic reasons (there are not many `Uppercase` crates) and due to the way how primitive types are resolved (https://github.com/rust-lang/rust/pull/32131).
2018-05-01Remove `macro_reexport`Vadim Petrochenkov-85/+0
It's subsumed by `feature(use_extern_macros)` and `pub use`
2018-05-01Force frame pointers for the backtrace testSimonas Kazlauskas-0/+1
2018-05-01Rollup merge of #50233 - mark-i-m:const_vec, r=kennytmkennytm-0/+17
Make `Vec::new` a `const fn` `RawVec::empty/_in` are a hack. They're there because `if size_of::<T> == 0 { !0 } else { 0 }` is not allowed in `const` yet. However, because `RawVec` is unstable, the `empty/empty_in` constructors can be removed when #49146 is done...
2018-04-29Auto merge of #48605 - KiChjang:unused-mut-warning, r=nikomatsakisbors-0/+56
Allow MIR borrowck to catch unused mutable locals Fixes #47279. r? @nikomatsakis
2018-04-29Auto merge of #50271 - sinkuu:fix_ice, r=eddybbors-0/+33
Fix ICE #48984 * ~~fbf6423 The tail type was not normalized.~~ * https://github.com/rust-lang/rust/commit/d0839d5680d2a51785eeb0811cf3e2beba90eacb The method had a wrong assumption that something whose parent is a trait is an associated item. Fixes #48984.
2018-04-28feature on testMark Mansi-0/+2
2018-04-28Track unused mutable variables across closuresKeith Yeung-0/+56
2018-04-27Don't feature gate bang macros on 'proc_macro_path_invoc'.Sergio Benitez-7/+7
2018-04-28Make `trait_of_item` return None for non associated itemsShotaro Yamada-0/+33
It have returned `Some` for constants in a trait definition, and `Instance::resolve` called `tcx.associated_item` for them, causing ICE.
2018-04-27Auto merge of #49822 - matthewjasper:dropck-closures, r=nikomatsakisbors-0/+70
Access individual fields of tuples, closures and generators on drop. Fixes #48623, by extending the change in #47917 to closures. Also does this for tuples and generators for consistency. Enums are unchanged because there is now way to borrow `*enum.field` without borrowing `enum.field` at the moment, so any error would be reported when the enum goes out of scope. Unions aren't changed because unions they don't automatically drop their fields. r? @nikomatsakis
2018-04-27Access individual fields of tuples, closures and generators on drop.Matthew Jasper-0/+70
2018-04-28Rollup merge of #50273 - Amanieu:issue-49532, r=alexcrichtonkennytm-0/+17
Allow #[inline] on closures Fixes #49632
2018-04-28Rollup merge of #49968 - christianpoveda:stabilize_dyn, r=nikomatsakiskennytm-4/+0
Stabilize dyn trait This PR stabilizes RFC 2113. I followed the [stabilization guide](https://forge.rust-lang.org/stabilization-guide.html). Related issue: https://github.com/rust-lang/rust/issues/49218
2018-04-27dyn_trait feature-gate just for stage0Christian Poveda-2/+0
2018-04-27removed dyn_trait feature from testsChristian Poveda-2/+0
2018-04-27Allow #[inline] on closuresAmanieu d'Antras-0/+17
Fixes #49632
2018-04-26Auto merge of #50253 - nikomatsakis:regressions-2018-04-26, r=eddybbors-0/+22
drop elaboration should reveal all This used to happen implicitly through the normalization function; but we now keep the param-env as is, which seems less surprising. cc #49685 r? @eddyb
2018-04-27Add one more prelude layer for extern crate names passed with `--extern`Vadim Petrochenkov-0/+21
2018-04-26add regression testNiko Matsakis-0/+22
Fixes #49685
2018-04-26Treat repr(Rust) univariant fieldless enums as a ZST (fixes #15747)Anthony Ramine-0/+33
This makes all those enums be represented the same way: ```rust enum A1 { B1 } enum A2 { B2 = 0 } enum A3 { B3, C3(!) } ```
2018-04-26Add a test for casts of univariant C-like enumsAnthony Ramine-2/+7
2018-04-25Make Vec::new constMark Mansi-0/+15
2018-04-25Fix crate:: in local pathsManish Goregaokar-0/+23
2018-04-25compiletest: introduce skip-transTatsuyuki Ishi-0/+17
2018-04-25Auto merge of #49986 - zofrex:better-derived-argument-names, r=Manishearthbors-0/+15
Provide better names for builtin deriving-generated attributes First attempt at fixing #49967 Not in love with any choices here, don't be shy if you aren't happy with anything :) I've tested that this produces nicer names in documentation, and that it no longer has issues conflicting with constants with the same name. (I guess we _could_ make a test for that... unsure if that would be valuable) In all cases I took the names from the methods as declared in the relevant trait. In some cases I had to prepend the names with _ otherwise there were errors about un-used variables. I'm uneasy with the inconsistency... do they all need to be like that? Is there a way to generate an alternate impl or use a different name (`_`?) in the cases where the arguments are not used? Lastly the gensym addition to Ident I implemented largely as suggested, but I want to point out it's a little circuitous (at least, as far as I understand it). `cx.ident_of(name)` is just `Ident::from_str`, so we create an Ident then another Ident from it. `Ident::with_empty_ctxt(Symbol::gensym(string))` may or may not be equivalent, I don't know if it's important to intern it _then_ gensym it. It seems like either we could use that, or if we do want a new method to make this convenient, it could be on Ident instead (`from_str_gensymed`?)
2018-04-24Test format hygieneJames Sanderson-0/+15
2018-04-24Auto merge of #50096 - alexcrichton:less-simd-warnings, r=michaelwoeristerbors-0/+35
Tweak some warnings around #[target_feature] This commit fixes up some issues discovered when getting the `stdsimd` crate's CI compiling again.
2018-04-24Auto merge of #49911 - rcoh:master, r=nikomatsakisbors-43/+0
Don't allow #[should_panic] with non-() tests Adds (removes) support for `#[should_panic]` when the test is non-`()`
2018-04-23Don't allow #[should_panic] with non-() testsRussell Cohen-43/+0