about summary refs log tree commit diff
path: root/src/test/run-pass/expr-if-struct.rs
AgeCommit message (Collapse)AuthorLines
2018-09-06Migrated slew of run-pass tests to various subdirectories of `ui/run-pass/`.Felix S. Klock II-40/+0
2015-04-01Fallout in testsNiko Matsakis-2/+2
2015-03-26Mass rename uint/int to usize/isizeAlex Crichton-2/+2
Now that support has been removed, all lingering use cases are renamed.
2015-01-29s/Show/Debug/gJorge Aparicio-1/+1
2015-01-25cleanup: s/impl Copy/#[derive(Copy)]/gJorge Aparicio-5/+2
2015-01-02Use `derive` rather than `deriving` in testsNick Cameron-1/+1
2014-12-08librustc: Make `Copy` opt-in.Niko Matsakis-0/+4
This change makes the compiler no longer infer whether types (structures and enumerations) implement the `Copy` trait (and thus are implicitly copyable). Rather, you must implement `Copy` yourself via `impl Copy for MyType {}`. A new warning has been added, `missing_copy_implementations`, to warn you if a non-generic public type has been added that could have implemented `Copy` but didn't. For convenience, you may *temporarily* opt out of this behavior by using `#![feature(opt_out_copy)]`. Note though that this feature gate will never be accepted and will be removed by the time that 1.0 is released, so you should transition your code away from using it. This breaks code like: #[deriving(Show)] struct Point2D { x: int, y: int, } fn main() { let mypoint = Point2D { x: 1, y: 1, }; let otherpoint = mypoint; println!("{}{}", mypoint, otherpoint); } Change this code to: #[deriving(Show)] struct Point2D { x: int, y: int, } impl Copy for Point2D {} fn main() { let mypoint = Point2D { x: 1, y: 1, }; let otherpoint = mypoint; println!("{}{}", mypoint, otherpoint); } This is the backwards-incompatible part of #13231. Part of RFC #3. [breaking-change]
2014-11-17Switch to purely namespaced enumsSteven Fackler-2/+2
This breaks code that referred to variant names in the same namespace as their enum. Reexport the variants in the old location or alter code to refer to the new locations: ``` pub enum Foo { A, B } fn main() { let a = A; } ``` => ``` pub use self::Foo::{A, B}; pub enum Foo { A, B } fn main() { let a = A; } ``` or ``` pub enum Foo { A, B } fn main() { let a = Foo::A; } ``` [breaking-change]
2014-05-30std: Rename {Eq,Ord} to Partial{Eq,Ord}Alex Crichton-1/+1
This is part of the ongoing renaming of the equality traits. See #12517 for more details. All code using Eq/Ord will temporarily need to move to Partial{Eq,Ord} or the Total{Eq,Ord} traits. The Total traits will soon be renamed to {Eq,Ord}. cc #12517 [breaking-change]
2014-02-28std: Change assert_eq!() to use {} instead of {:?}Alex Crichton-0/+1
Formatting via reflection has been a little questionable for some time now, and it's a little unfortunate that one of the standard macros will silently use reflection when you weren't expecting it. This adds small bits of code bloat to libraries, as well as not always being necessary. In light of this information, this commit switches assert_eq!() to using {} in the error message instead of {:?}. In updating existing code, there were a few error cases that I encountered: * It's impossible to define Show for [T, ..N]. I think DST will alleviate this because we can define Show for [T]. * A few types here and there just needed a #[deriving(Show)] * Type parameters needed a Show bound, I often moved this to `assert!(a == b)` * `Path` doesn't implement `Show`, so assert_eq!() cannot be used on two paths. I don't think this is much of a regression though because {:?} on paths looks awful (it's a byte array). Concretely speaking, this shaved 10K off a 656K binary. Not a lot, but sometime significant for smaller binaries.
2013-10-25Remove ancient emacs mode lines from test casesBrian Anderson-1/+0
These are relics that serve no purpose.
2013-05-29librustc: Stop reexporting the standard modules from prelude.Patrick Walton-1/+1
2013-05-19Use assert_eq! rather than assert! where possibleCorey Richardson-2/+2
2013-03-29librustc: Remove `fail_unless!`Patrick Walton-2/+2
2013-03-22test: Remove `pure` from the test suitePatrick Walton-2/+2
2013-03-07librustc: Convert all uses of `assert` over to `fail_unless!`Patrick Walton-2/+2
2013-02-14librustc: Replace `impl Type : Trait` with `impl Trait for Type`. ↵Patrick Walton-1/+1
rs=implflipping
2013-02-01check-fast fallout from removing export, r=burningtreeGraydon Hoare-1/+1
2013-01-26testsuite: Eliminate uses of structural records from most run-pass testsTim Chevalier-2/+5
Except the pipes tests (that needs a snapshot)
2012-12-10Reliciense makefiles and testsuite. Yup.Graydon Hoare-0/+10
2012-11-19rustc: Implement explicit self for Eq and Ord. r=graydonPatrick Walton-3/+3
2012-09-20rustc: De-mode all overloaded operatorsPatrick Walton-3/+4
2012-09-07rustc: Add an "ne" method to the Eq trait, and implement it everywherePatrick Walton-0/+1
2012-08-29rustc: Make `<` and `=` into traitsPatrick Walton-2/+8
2012-01-19rustc: Make the pretty printer output commas after enum variants. Update all ↵Patrick Walton-1/+1
tests accordingly.
2012-01-19test: "tag" -> "enum" in run-pass and run-failPatrick Walton-1/+1
2011-08-20ReformatBrian Anderson-1/+1
This changes the indexing syntax from .() to [], the vector syntax from ~[] to [] and the extension syntax from #fmt() to #fmt[]
2011-07-27Reformat for new syntaxMarijn Haverbeke-3/+3
2011-06-25Remove variable name 'res' from test suiteMarijn Haverbeke-4/+4
2011-06-15Reformat source tree (minus a couple tests that are still grumpy).Graydon Hoare-14/+9
2011-05-14Remove xfail-boot lines from testsBrian Anderson-1/+0
2011-05-02Un-revert "Use different syntax for checks that matter to typestate", fixing ↵Patrick Walton-2/+2
the problem. This reverts commit d08b443fffb1181d8d45ae5d061412f202dd4118.
2011-05-02Revert "Use different syntax for checks that matter to typestate"Graydon Hoare-2/+2
This reverts commit aa25f22f197682de3b18fc4c8ba068d1feda220f. It broke stage2, not sure why yet.
2011-05-02Use different syntax for checks that matter to typestateTim Chevalier-2/+2
This giant commit changes the syntax of Rust to use "assert" for "check" expressions that didn't mean anything to the typestate system, and continue using "check" for checks that are used as part of typestate checking. Most of the changes are just replacing "check" with "assert" in test cases and rustc.
2011-03-28Handle structural types as the result of if expressionsBrian Anderson-0/+24