]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #23452 - nikomatsakis:unsafety-subtyping, r=nrc
authorbors <bors@rust-lang.org>
Wed, 18 Mar 2015 03:22:12 +0000 (03:22 +0000)
committerbors <bors@rust-lang.org>
Wed, 18 Mar 2015 03:22:12 +0000 (03:22 +0000)
Safe fns are no longer subtypes of unsafe fns, but you can coerce from one to the other.

This is a [breaking-change] in that impl fns must now be declared `unsafe` if the trait is declared `unsafe`. In some rare cases, the subtyping change may also direct affect you, but no such cases were encountered in practice.

Fixes #23449.

r? @nrc

1  2 
src/librustc/middle/ty.rs
src/librustc_trans/trans/consts.rs
src/librustc_trans/trans/expr.rs
src/librustc_typeck/check/mod.rs

Simple merge
Simple merge
Simple merge
Simple merge