about summary refs log tree commit diff
path: root/src/test/run-pass
AgeCommit message (Collapse)AuthorLines
2018-05-14Add implementation of Extend for ()Taylor Cramer-0/+20
2018-05-14Auto merge of #50735 - eddyb:issue-50731, r=nikomatsakisbors-0/+15
rustc: don't trip an assertion for enums with present but uninhabited variants. Fixes #50731. r? @nikomatsakis
2018-05-14Auto merge of #50385 - durka:stabilize-macro-lifetime, r=petrochenkovbors-7/+0
stabilize macro_lifetime_matcher This stabilizes `:lifetime` which has completed FCP in #34303.
2018-05-14rustc: don't trip an assertion for enums with present but uninhabited variants.Eduard-Mihai Burtescu-0/+15
2018-05-14Auto merge of #50694 - leodasvacas:fix-impl-trait-self-substitution, ↵bors-0/+29
r=petrochenkov Fix self referential impl Trait substitutions 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-13stabilize :lifetimeAlex Burka-7/+0
2018-05-13Fix conversion from Miri Value to ConstValueJohn Kåre Alsaker-0/+21
2018-05-13Macros: Add a 'literal' fragment specifierDan Aloni-0/+143
Implements RFC 1576. See: https://github.com/rust-lang/rfcs/blob/master/text/1576-macros-literal-matcher.md Changes are mostly in libsyntax, docs, and tests. Feature gate is enabled for 1.27.0. Many thanks to Vadim Petrochenkov for following through code reviews and suggestions. Example: ````rust macro_rules! test_literal { ($l:literal) => { println!("literal: {}", $l); }; ($e:expr) => { println!("expr: {}", $e); }; } fn main() { let a = 1; test_literal!(a); test_literal!(2); test_literal!(-3); } ``` Output: ``` expr: 1 literal: 2 literal: -3 ```
2018-05-13Auto merge of #50622 - eddyb:make-room-for-ghosts, r=nikomatsakisbors-4/+69
rustc: leave space for fields of uninhabited types to allow partial initialization. Fixes #49298 by only collapsing uninhabited enum variants, and only if they only have ZST fields. Fixes #50442 incidentally (@nox's optimization didn't take into account uninhabited variants).
2018-05-12Fix 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-12Rollup merge of #50550 - llogiq:fmt-result, r=petrochenkovMark Simulacrum-2/+2
use fmt::Result where applicable This is a quite boring PR, but I think the type alias improves readability, so why not use it?
2018-05-11Fix `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-10kill get-default run-pass testNiko Matsakis-31/+0
It no longer passes, and the ui test subsumes it anyhow.
2018-05-10rustc: leave space for fields of uninhabited types to allow partial ↵Eduard-Mihai Burtescu-4/+69
initialization.
2018-05-09Rollup merge of #50505 - Aaronepower:add-test, r=oli-obkkennytm-0/+29
Added regression function match value test closes #44333
2018-05-09Rollup merge of #50460 - F001:const_string, r=kennytmkennytm-1/+6
Make `String::new()` const Following the steps of https://github.com/rust-lang/rust/pull/50233 , make `String::new()` a `const fn`.
2018-05-09use fmt::Result where applicableAndre Bogus-2/+2
2018-05-08Auto merge of #50390 - hdhoang:46205_deny_by_default, r=nikomatsakisbors-36/+0
lint: deny incoherent_fundamental_impls by default Warn the ecosystem of the pending intent-to-disallow in #49799. There are 4 ICEs on my machine, look unrelated (having happened before in https://github.com/rust-lang/rust/issues/49146#issuecomment-384473523) ```rust thread 'main' panicked at 'assertion failed: position <= slice.len()', libserialize/leb128.rs:97:1 ``` ``` [run-pass] run-pass/allocator/xcrate-use2.rs [run-pass] run-pass/issue-12133-3.rs [run-pass] run-pass/issue-32518.rs [run-pass] run-pass/trait-default-method-xc-2.rs ``` r? @nikomatsakis
2018-05-07Added regression function match value test, closes #44333Aaron Power-0/+29
2018-05-05make `String::new()` constF001-1/+6
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-02lint: deny incoherent_fundamental_impls by defaultHoàng Đức Hiếu-36/+0
Warn the ecosystem of the pending intent-to-disallow in #49799.
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