about summary refs log tree commit diff
path: root/src/test/run-make/graphviz-flowgraph
AgeCommit message (Collapse)AuthorLines
2017-03-30kill the graphviz-flowgraph testsNiko Matsakis-1963/+0
They are so annoying to update, and haven't caught any bugs afaik.
2017-02-18Add tests for control flow in while conditionTaylor Cramer-32/+32
2016-12-28rustc: always print nested nodes where a HIR map is available.Eduard-Mihai Burtescu-7/+7
2016-11-10tests: fix fallout in flowgraph graphviz comparison dot files.Eduard Burtescu-26/+78
2015-11-18Patch graphviz tests to account for the fact that nested items are notNiko Matsakis-5/+5
listed (an improvement, I think).
2015-10-31Remove PatWildMultiVadim Petrochenkov-1/+1
2015-07-30Rename the unstable option `--xpretty` to `--unpretty`Felix S. Klock II-1/+1
(Inspired by discussion with Gankro.)
2015-03-27Feature gate *all* slice patterns. #23121Brian Anderson-0/+2
Until some backwards-compatibility hazards are fixed in #23121, these need to be unstable. [breaking-change]
2015-03-05Remove integer suffixes where the types in compiled code are identical.Eduard Burtescu-11/+11
2015-02-22revise handling of match expressions so that arms branch to next arm.James Miller-9/+9
Update the graphviz tests accordingly. Fixes #22073. (Includes regression test for the issue.) (Factoring of aatch CFG code, Part 4.)
2015-02-18Update suffixes en masse in tests using `perl -p -i -e`Niko Matsakis-11/+11
2015-01-31Kill more `isize`sTobias Bucher-382/+382
2015-01-20rustc: Remove deprecated flagsAlex Crichton-1/+1
This commit removes a number of deprecated flags from the compiler: * opt-level => -C opt-level * debuginfo => -C debuginfo * print-crate-name => --print crate-name * print-file-name => --print file-names * no-trans => -Z no-trans * no-analysis => -Z no-analysis * parse-only => -Z parse-only * dep-info => --emit dep-info This commit also moves the --pretty flag behind `-Z unstable-options` as the pretty printer will likely not be stable for 1.0 cc #19051
2015-01-13graphviz-flowgraph tests: use new `--xpretty flowgraph,unlabelled` option.Felix S. Klock II-19/+19
This makes the tests much easier to maintain; the particular details of the labels attached to exiting scopes is not worth the effort required to keep it up to date as things change in the compiler internals.
2015-01-08Update graphviz tests to accommodate new isize/usize types and is/us suffixes.Felix S. Klock II-87/+87
2015-01-06test fallout from isize/usizeCorey Richardson-335/+335
2014-12-22fix run-make/ tests now flowgraph printing has moved to the unstable ↵Felix S. Klock II-1/+1
`--xpretty` option.
2014-11-17Switch to purely namespaced enumsSteven Fackler-10/+10
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-11-07rustc: Process #[cfg]/#[cfg_attr] on cratesAlex Crichton-5/+5
This commit implements processing these two attributes at the crate level as well as at the item level. When #[cfg] is applied at the crate level, then the entire crate will be omitted if the cfg doesn't match. The #[cfg_attr] attribute is processed as usual in that the attribute is included or not depending on whether the cfg matches. This was spurred on by motivations of #18585 where #[cfg_attr] annotations will be applied at the crate-level. cc #18585
2014-08-27Implement generalized object and type parameter bounds (Fixes #16462)Niko Matsakis-559/+829
2014-08-26Rebasing changesNick Cameron-2/+2
2014-08-26DST coercions and DST structsNick Cameron-27/+27
[breaking-change] 1. The internal layout for traits has changed from (vtable, data) to (data, vtable). If you were relying on this in unsafe transmutes, you might get some very weird and apparently unrelated errors. You should not be doing this! Prefer not to do this at all, but if you must, you should use raw::TraitObject rather than hardcoding rustc's internal representation into your code. 2. The minimal type of reference-to-vec-literals (e.g., `&[1, 2, 3]`) is now a fixed size vec (e.g., `&[int, ..3]`) where it used to be an unsized vec (e.g., `&[int]`). If you want the unszied type, you must explicitly give the type (e.g., `let x: &[_] = &[1, 2, 3]`). Note in particular where multiple blocks must have the same type (e.g., if and else clauses, vec elements), the compiler will not coerce to the unsized type without a hint. E.g., `[&[1], &[1, 2]]` used to be a valid expression of type '[&[int]]'. It no longer type checks since the first element now has type `&[int, ..1]` and the second has type &[int, ..2]` which are incompatible. 3. The type of blocks (including functions) must be coercible to the expected type (used to be a subtype). Mostly this makes things more flexible and not less (in particular, in the case of coercing function bodies to the return type). However, in some rare cases, this is less flexible. TBH, I'm not exactly sure of the exact effects. I think the change causes us to resolve inferred type variables slightly earlier which might make us slightly more restrictive. Possibly it only affects blocks with unreachable code. E.g., `if ... { fail!(); "Hello" }` used to type check, it no longer does. The fix is to add a semicolon after the string.
2014-07-29syntax: add support for quoting armsErick Tryzelaar-4/+4
2014-07-25librustc: Disallow mutation and assignment in pattern guards, and modifyPatrick Walton-29/+35
the CFG for match statements. There were two bugs in issue #14684. One was simply that the borrow check didn't know about the correct CFG for match statements: the pattern must be a predecessor of the guard. This disallows the bad behavior if there are bindings in the pattern. But it isn't enough to prevent the memory safety problem, because of wildcards; thus, this patch introduces a more restrictive rule, which disallows assignments and mutable borrows inside guards outright. I discussed this with Niko and we decided this was the best plan of action. This breaks code that performs mutable borrows in pattern guards. Most commonly, the code looks like this: impl Foo { fn f(&mut self, ...) {} fn g(&mut self, ...) { match bar { Baz if self.f(...) => { ... } _ => { ... } } } } Change this code to not use a guard. For example: impl Foo { fn f(&mut self, ...) {} fn g(&mut self, ...) { match bar { Baz => { if self.f(...) { ... } else { ... } } _ => { ... } } } } Sometimes this can result in code duplication, but often it illustrates a hidden memory safety problem. Closes #14684. [breaking-change]
2014-07-07Improve non-exhaustive pattern witnesses for structs with multiple fieldsJakub Wieczorek-2/+2
2014-06-29librustc: Remove the fallback to `int` for integers and `f64` forPatrick Walton-332/+332
floating point numbers for real. This will break code that looks like: let mut x = 0; while ... { x += 1; } println!("{}", x); Change that code to: let mut x = 0i; while ... { x += 1; } println!("{}", x); Closes #15201. [breaking-change]
2014-06-18Regression tests for flowgraph construction bug on ExprWhile.Felix S. Klock II-1/+444
2014-05-15Unit tests for flowgraph pretty printing.Felix S. Klock II-0/+1190
Each test works by rendering the flowgraph for the last identified block we see in expanded pretty-printed output, and comparing it (via `diff`) against a checked in "foo.dot-expected.dot" file. Each test post-processes the output to remove NodeIds ` (id=NUM)` so that the expected output is somewhat stable (or at least independent of how we assign NodeIds) and easier for a human to interpret when looking at the expected output file itself. ---- Test writing style notes: I usually tried to write the tests in a way that would avoid duplicate labels in the output rendered flow graph, when possible. The tests that have string literals "unreachable" in the program text are deliberately written that way to remind the reader that the unreachable nodes in the resulting graph are not an error in the control flow computation, but rather a natural consequence of its construction.