]> git.lizzy.rs Git - rust.git/commit
optimize sanity check path printing
authorRalf Jung <post@ralfj.de>
Sat, 18 Aug 2018 11:46:52 +0000 (13:46 +0200)
committerRalf Jung <post@ralfj.de>
Wed, 22 Aug 2018 11:08:39 +0000 (13:08 +0200)
commit49999e9b1d816e1ca7365887fd42422702bc46cb
tree1b8ce51e24dbffce002926541ca0b8822cf43fac
parent42a1239a18138db3b765d9b249b1ef83e19cccfa
optimize sanity check path printing

During the sanity check, we keep track of the path we are below in a `Vec`.  We
avoid cloning that `Vec` unless we hit a pointer indirection.  The `String`
representation is only computed when validation actually fails.
src/librustc_lint/builtin.rs
src/librustc_mir/interpret/validity.rs
src/test/ui/consts/const-eval/double_check2.stderr
src/test/ui/consts/const-eval/ub-enum-ptr.rs [deleted file]
src/test/ui/consts/const-eval/ub-enum-ptr.stderr [deleted file]
src/test/ui/consts/const-eval/ub-enum.rs [new file with mode: 0644]
src/test/ui/consts/const-eval/ub-enum.stderr [new file with mode: 0644]
src/test/ui/union-ub-fat-ptr.stderr