]> git.lizzy.rs Git - rust.git/commit
Check WF of predicate with defaults only if all in LHS have default
authorleonardo.yvens <leoyvens@gmail.com>
Sun, 21 Jan 2018 14:09:06 +0000 (12:09 -0200)
committerleonardo.yvens <leoyvens@gmail.com>
Wed, 28 Feb 2018 15:33:15 +0000 (12:33 -0300)
commitaddc404d32b8b153f65b180c4bcdc5ccaaba2a77
tree5889b6c08df4756782c626aa73795dfd23fe2cf3
parent35499aa9fcef2cab965f0c1e04da1b97ec715d64
Check WF of predicate with defaults only if all in LHS have default

 Given a trait predicate, if all params appearing in the LHS have
defaults then it should be a backwards compatible predicate. We verify
that by checking the WF of predicate with all defaults substituted
simultaneously.
src/librustc/ty/mod.rs
src/librustc_typeck/check/wfcheck.rs
src/test/run-pass/defaults-well-formedness.rs
src/test/ui/type-check-defaults.rs
src/test/ui/type-check-defaults.stderr