summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2016-01-10Remove unneeded #[lang = "iterator"]Guillaume Gomez-1/+0
2016-01-09Rollup merge of #30789 - D101101:patch-1, r=steveklabnikSteve Klabnik-1/+0
2016-01-09Rollup merge of #30771 - tsion:mir-text-terminator-fix, r=eddybSteve Klabnik-1/+1
This just removes the `Some()` that appeared around terminators in MIR text output after https://github.com/rust-lang/rust/pull/30481 (cc @nagisa). The graphviz is already fixed. r? @eddyb
2016-01-09Rollup merge of #30766 - steveklabnik:gh28810, r=steveklabnikSteve Klabnik-106/+106
Doing so is considered weaker writing. Thanks @Charlotteis! Fixes #28810
2016-01-09Remove many instances of 'just'Steve Klabnik-106/+106
Doing so is considered weaker writing. Thanks @Charlotteis! Fixes #28810
2016-01-09Fix a typo in rustc_mir::build::scope's documentationErick Tryzelaar-1/+1
2016-01-09Fix arm-unknown-linux-gnueabi floating-point ABIJörg Krause-2/+2
gnueabi indicates soft whereas gnueabihf indicates hard floating-point ABI.
2016-01-09Remove unused link from enums.mdSergey Veselkov-1/+0
2016-01-08Minor rebase correctionsNiko Matsakis-1/+2
2016-01-08permit coercions if `[error]` is found in either typeNiko Matsakis-30/+29
2016-01-08improve cast handling - this fixes test failuresAriel Ben-Yehuda-1/+2
the problem is that now "type_is_known_to_be_sized" now returns false when called on a type with ty_err inside - this prevents spurious errors (we may want to move the check to check::cast anyway - see #12894).
2016-01-08Change error scheme so that if projection fails we generate `A::B` instead ↵Niko Matsakis-13/+58
of `TyError`
2016-01-08Remove ErrorCandidate in favor of just generating an ambiguous resultNiko Matsakis-11/+11
2016-01-08Make coherence more tolerant of error types.Niko Matsakis-1/+174
Fixes #29857. Fixes #30589.
2016-01-08Auto merge of #30782 - steveklabnik:rollup, r=steveklabnikbors-69/+92
- Successful merges: #30584, #30747, #30755, #30758, #30760, #30769 - Failed merges: #30766
2016-01-08Rollup merge of #30769 - steveklabnik:gh30069, r=apasel422Steve Klabnik-0/+4
Fixes #30069
2016-01-08Rollup merge of #30760 - jonastepe:nomicon_vec_insert_remove_len, r=apasel422Steve Klabnik-2/+2
len needs to be prefixed by self for this to work. That is something which trips me up all the time. It's reassuring to see that happening to seasoned Rust programmers.
2016-01-08Rollup merge of #30758 - birkenfeld:fix-30743, r=steveklabnikSteve Klabnik-23/+17
(fixes #30743) Not sure if the "Note" should be kept.
2016-01-08Rollup merge of #30755 - datagrok:master, r=steveklabnikSteve Klabnik-27/+41
I'm working my way through TRPL beginning at "Syntax and Semantics" as was recommended in a previous version. I'm expecting the chapter to incrementally build up my knowledge of the language section by section, assuming no prior Rust experience. So it was a bit of a speed-bump to encounter references and the vector type in a code example long before they had been defined and explained. Another commit in this PR tries to make consistent what is a "chapter" of TRPL versus a "section." Just a nit-pick, but not thinking about that stuff keeps my focus on the important material. My background: Python programmer since ~2000, with moderate exposure to C, C++, assembly, operating systems, and system architecture in university several years ago. For your kind consideration, feel welcome to use or drop or rework any part of this.
2016-01-08Rollup merge of #30747 - nagisa:mir-reenable-test, r=nikomatsakisSteve Klabnik-12/+6
Fixes #30674 The test seems to work fine and assertion passes. The test seems to also be generated from MIR (LLVM IR has footprint of MIR translator), thus I’m reenabling it.
2016-01-08Rollup merge of #30584 - GuillaumeGomez:new_handles, r=pnkfelixSteve Klabnik-5/+22
Last part of #30413. r? @pnkfelix
2016-01-08Fixes #30628 by adding new snapshot for dragonfly bsdDave Huseby-0/+1
2016-01-08The lint warnings are not reported since we report the errors first and then ↵Felix S. Klock II-2/+0
exit. I think that behavior is fine, so I am removing the expected warnings from these tests.
2016-01-08Also store MIR of closures in crate metadata.Michael Woerister-6/+9
2016-01-08Change destination accessor to return referencesSimonas Kazlauskas-4/+13
Previously it was returning a value, mostly for the two reasons: * Cloning Lvalue is very cheap most of the time (i.e. when Lvalue is not a Projection); * There’s users who want &mut lvalue and there’s users who want &lvalue. Returning a value allows to make either one easier when pattern matching (i.e. Some(ref dest) or Some(ref mut dest)). However, I’m now convinced this is an invalid approach. Namely the users which want a mutable reference may modify the Lvalue in-place, but the changes won’t be reflected in the final MIR, since the Lvalue modified is merely a clone. Instead, we have two accessors `destination` and `destination_mut` which return a reference to the destination in desired mode.
2016-01-08Add new help messages for E0425Guillaume Gomez-5/+22
2016-01-08Added proper lint for the unit variant/struct warning.Felix S. Klock II-16/+27
2016-01-08update test to reflect other sources of brokenness in it under newFelix S. Klock II-1/+6
macro future proofing rules. (We may want to think about what this test was actually testing and figure out a way to test it without running afoul of macro future proofing. I spent some time trying to do this, e.g. by inserting parenthesis in the macro input pattern, but I could not quickly get it working, so I took this tack instead.)
2016-01-08[MIR] Fix translation of ConstVal::{Struct, Tuple}Simonas Kazlauskas-10/+37
Fixes #30772
2016-01-07Auto merge of #30757 - michaelwoerister:mir-visitor-cleanup, r=jroeschbors-456/+281
After a call to `visit_def_id()` missing in `mir::visit::Visitor` but not `mir::visit::MutVisitor` has caused me a couple hours of error hunting, I decided I'd take the time to get rid of the code duplication between the two implementations. cc @rust-lang/compiler
2016-01-07Fix MIR text output for terminators since they were made optional.Scott Olson-1/+1
2016-01-07Auto merge of #30748 - tsion:mir-tuple-fix, r=eddybbors-4/+4
r? @nikomatsakis (Related issue about `debug_tuple` at https://github.com/rust-lang/rfcs/issues/1448.) ```rust fn main() { let _x = (); } ``` ```diff --- empty_tuple-old.mir 2016-01-06 16:04:24.206409186 -0600 +++ empty_tuple-new.mir 2016-01-06 14:26:17.324888585 -0600 @@ -1,13 +1,13 @@ fn() -> () { let var0: (); // _x let mut tmp0: (); bb0: { - var0 = ; + var0 = (); Some(goto -> bb1); } bb1: { Some(return); } } ```
2016-01-07updated test to reflect loosening of check (for issue #30379).Felix S. Klock II-2/+6
2016-01-07extend warning cycle to cover matching unit-structs via `S(..)`Felix S. Klock II-7/+10
(this makes them handled like enum unit-variants.)
2016-01-07fix broken float methodsPyfisch-3/+3
closes #30657
2016-01-07After RFC amendment 1384, FOLLOW(pat) includes `|`, so update tests accordingly.Felix S. Klock II-1/+10
2016-01-07Updated future-proofing test, removed outdated test, and addedFelix S. Klock II-18/+28
run-pass test for some new functionality.
2016-01-07extending FOLLOW(NT) as specified in amendment.Felix S. Klock II-4/+7
See RFC amendment 1384: https://github.com/rust-lang/rfcs/pull/1384
2016-01-07macro_rules: proper FIRST/FOLLOW computations for checking macro_rules validity.Felix S. Klock II-16/+500
See RFC amendment 1384 and tracking issue 30450: https://github.com/rust-lang/rfcs/pull/1384 https://github.com/rust-lang/rust/issues/30450 Moved old check_matcher code into check_matcher_old combined the two checks to enable a warning cycle (where we will continue to error if the two checks agree to reject, accept if the new check says accept, and warn if the old check accepts but the new check rejects).
2016-01-07Remove extraneous [], replace accidental removed link to heap sectionMichael F. Lamb-8/+8
2016-01-07Link Nomicon in PhantomData's docsSteve Klabnik-0/+4
Fixes #30069
2016-01-07fix trailing whitespacePyfisch-1/+1
2016-01-07f32: inline methods with special variant for msvcPyfisch-32/+27
2016-01-07Expand EO308 to mention try!Steve Klabnik-0/+24
Fixes #28953
2016-01-07Auto merge of #30739 - pnkfelix:finish-enable-rpath-by-default, r=dotdashbors-1/+1
finish enabling `-C rpath` by default in rustc. See #30353.
2016-01-07Move os_str docs to OsString in order to be visible in HTML (fixes #30743)Georg Brandl-23/+17
2016-01-07Auto merge of #30734 - tsion:mir-pretty, r=nikomatsakisbors-18/+32
* Put `const` in front of every `ConstVal`. * Pretty-print bytestrings as they appear in Rust source. * Pretty-print `ConstVal::{Struct, Tuple, Array, Repeat}` by pretty-printing the `ast::NodeId`. This is a temporary measure, and probably not perfect, but I'm avoiding anything more complex since I hear the const evaluator might not be AST-based in the near future. ```rust struct Point { x: i32, y: i32, } fn consts() { let _float = 3.14159; let _non_const_int = -42; const INT: i32 = -42; let _int = INT; let _uint = 42u32; let _str = "a string"; let _bytestr = b"a bytes\xFF\n\ttri\'\"\\ng"; let _bool = true; const STRUCT: Point = Point { x: 42, y: 42 }; let _struct = STRUCT; const EXTERNAL_STRUCT: std::sync::atomic::AtomicUsize = std::sync::atomic::ATOMIC_USIZE_INIT; let _external_struct = EXTERNAL_STRUCT; const TUPLE: (i32, &'static str, &'static [u8; 5]) = (1, "two", b"three"); let _tuple = TUPLE; const FUNC: fn() = consts; let _function = FUNC; let _non_const_function = consts; const ARRAY: [&'static str; 3] = ["a", "b", "c"]; let _array = ARRAY; const REPEAT: [&'static [u8; 3]; 10] = [b"foo"; 10]; let _repeat = REPEAT; } ``` ```diff --- consts-old.mir 2016-01-05 23:23:14.163807017 -0600 +++ consts-new.mir 2016-01-05 23:04:51.121386151 -0600 @@ -1,45 +1,45 @@ fn() -> () { let var0: f64; // _float let var1: i32; // _non_const_int let var2: i32; // _int let var3: u32; // _uint let var4: &str; // _str let var5: &[u8; 18]; // _bytestr let var6: bool; // _bool let var7: Point; // _struct let var8: core::sync::atomic::AtomicUsize; // _external_struct let var9: (i32, &str, &[u8; 5]); // _tuple let var10: fn(); // _function let var11: fn() {consts}; // _non_const_function let var12: [&str; 3]; // _array let var13: [&[u8; 3]; 10]; // _repeat let mut tmp0: (); bb0: { - var0 = 3.14159; - var1 = Neg(42); - var2 = -42; - var3 = 42; - var4 = Str("a string"); - var5 = ByteStr[97, 32, 98, 121, 116, 101, 115, 255, 10, 9, 116, 114, 105, 39, 34, 92, 110, 103]; - var6 = true; - var7 = Struct(51); + var0 = const 3.14159; + var1 = Neg(const 42); + var2 = const -42; + var3 = const 42; + var4 = const "a string"; + var5 = const b"a bytes\xff\n\ttri\'\"\\ng"; + var6 = const true; + var7 = const expr Point{x: 42, y: 42,}; var8 = consts::EXTERNAL_STRUCT; - var9 = Tuple(78); - var10 = Function(DefId { krate: 0, node: DefIndex(7) => consts }); + var9 = const expr (1, "two", b"three"); + var10 = const consts; var11 = consts; - var12 = Array(105, 3); - var13 = Repeat(122, 10); + var12 = const expr ["a", "b", "c"]; + var13 = const expr [b"foo"; 10]; drop var8; drop var7; goto -> bb1; } bb1: { return; } bb2: { diverge; } } ```
2016-01-07Auto merge of #30317 - jseyfried:refactor_type_folder, r=nikomatsakisbors-873/+689
`TypeFoldable`s can currently be visited inefficiently with an identity folder that is run only for its side effects. This creates a more efficient visitor for `TypeFoldable`s and uses it to implement `RegionEscape` and `HasProjectionTypes`, fixing cleanup issue #20298. This is a pure refactoring.
2016-01-07len needs to be prefixed by self for this to work. The final code in this ↵jonastepe-2/+2
section of the book is correct.
2016-01-07Fix tests that used `// | help:` annotationsFlorian Hahn-11/+13