rust/src/librustc/middle
Aaron Turon 8389253df0 Add generic conversion traits
This commit:

* Introduces `std::convert`, providing an implementation of
RFC 529.

* Deprecates the `AsPath`, `AsOsStr`, and `IntoBytes` traits, all
in favor of the corresponding generic conversion traits.

  Consequently, various IO APIs now take `AsRef<Path>` rather than
`AsPath`, and so on. Since the types provided by `std` implement both
traits, this should cause relatively little breakage.

* Deprecates many `from_foo` constructors in favor of `from`.

* Changes `PathBuf::new` to take no argument (creating an empty buffer,
  as per convention). The previous behavior is now available as
  `PathBuf::from`.

* De-stabilizes `IntoCow`. It's not clear whether we need this separate trait.

Closes #22751
Closes #14433

[breaking-change]
2015-03-23 15:01:45 -07:00
..
cfg don't use Result::ok just to be able to use unwrap/unwrap_or 2015-03-20 08:19:13 +01:00
infer don't use Result::ok just to be able to use unwrap/unwrap_or 2015-03-20 08:19:13 +01:00
traits Add generic conversion traits 2015-03-23 15:01:45 -07:00
astconv_util.rs
astencode.rs Auto merge of #23512 - oli-obk:result_ok_unwrap, r=alexcrichton 2015-03-20 23:16:47 +00:00
check_const.rs
check_loop.rs
check_match.rs Register new snapshots 2015-03-18 16:32:32 -07:00
check_rvalues.rs
check_static_recursion.rs
const_eval.rs First-class struct and tuple constants 2015-03-11 21:17:25 +01:00
dataflow.rs
dead.rs Revert "Extend dead code lint to detect more unused enum variants" 2015-03-14 12:14:32 +05:30
def.rs
dependency_format.rs
effect.rs syntax: move MethMac to MacImplItem and combine {Provided,Required}Method into MethodTraitItem. 2015-03-11 23:39:16 +02:00
entry.rs
expr_use_visitor.rs Move unsafety out of the subtyping relation and into coercion. 2015-03-17 17:29:07 -04:00
fast_reject.rs Strip all leading/trailing newlines 2015-03-15 09:08:21 -07:00
graph.rs
intrinsicck.rs
lang_items.rs Replace TyDesc and its uses with trait vtables and a type_name intrinsic. 2015-03-17 21:00:23 +02:00
liveness.rs Fallout of std::old_io deprecation 2015-03-13 10:00:28 -07:00
mem_categorization.rs Move unsafety out of the subtyping relation and into coercion. 2015-03-17 17:29:07 -04:00
pat_util.rs Revert "Extend dead code lint to detect more unused enum variants" 2015-03-14 12:14:32 +05:30
privacy.rs
reachable.rs syntax: move MethMac to MacImplItem and combine {Provided,Required}Method into MethodTraitItem. 2015-03-11 23:39:16 +02:00
recursion_limit.rs
region.rs
resolve_lifetime.rs syntax: move MethMac to MacImplItem and combine {Provided,Required}Method into MethodTraitItem. 2015-03-11 23:39:16 +02:00
stability.rs syntax: gather common fields of impl & trait items into their respective types. 2015-03-11 23:39:16 +02:00
subst.rs
ty_fold.rs Remove subtyping for object types and replace with an *upcast* coercion. 2015-03-17 08:34:25 -04:00
ty_walk.rs Remove explicit syntax highlight from docs. 2015-03-13 19:25:18 -04:00
ty.rs Auto merge of #23452 - nikomatsakis:unsafety-subtyping, r=nrc 2015-03-18 03:22:12 +00:00
weak_lang_items.rs