From fae4a9e5ba36202dc8036cf90a7dd8ace4c1336a Mon Sep 17 00:00:00 2001
From: James Miller <james@aatch.net>
Date: Fri, 28 Jun 2013 16:00:30 +1200
Subject: [PATCH] Rename Const/Owned in more places

---
 src/librustc/middle/typeck/astconv.rs       |  2 +-
 src/test/compile-fail/trait-bounds-sugar.rs | 10 +++++-----
 src/test/run-pass/trait-bounds-in-arc.rs    | 16 ++++++++--------
 3 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/src/librustc/middle/typeck/astconv.rs b/src/librustc/middle/typeck/astconv.rs
index 3d0cbec8b1a..07fb23fea48 100644
--- a/src/librustc/middle/typeck/astconv.rs
+++ b/src/librustc/middle/typeck/astconv.rs
@@ -788,7 +788,7 @@ fn conv_builtin_bounds(tcx: ty::ctxt, ast_bounds: &Option<OptVec<ast::TyParamBou
             }
             builtin_bounds
         },
-        // ~Trait is sugar for ~Trait:Owned.
+        // ~Trait is sugar for ~Trait:Send.
         (&None, ty::UniqTraitStore) => {
             let mut set = ty::EmptyBuiltinBounds(); set.add(ty::BoundSend); set
         }
diff --git a/src/test/compile-fail/trait-bounds-sugar.rs b/src/test/compile-fail/trait-bounds-sugar.rs
index 8c641f4c850..68a0ae90014 100644
--- a/src/test/compile-fail/trait-bounds-sugar.rs
+++ b/src/test/compile-fail/trait-bounds-sugar.rs
@@ -13,7 +13,7 @@
 trait Foo {
 }
 
-fn a(_x: ~Foo) { // should be same as ~Foo:Owned
+fn a(_x: ~Foo) { // should be same as ~Foo:Send
 }
 
 fn b(_x: @Foo) { // should be same as ~Foo:'static
@@ -22,15 +22,15 @@ fn b(_x: @Foo) { // should be same as ~Foo:'static
 fn c(_x: &'static Foo) { // should be same as &'static Foo:'static
 }
 
-fn d(x: ~Foo:Const) {
-    a(x); //~ ERROR expected bounds `Owned`
+fn d(x: ~Foo:Freeze) {
+    a(x); //~ ERROR expected bounds `Send`
 }
 
-fn e(x: @Foo:Const) {
+fn e(x: @Foo:Freeze) {
     b(x); //~ ERROR expected bounds `'static`
 }
 
-fn f(x: &'static Foo:Const) {
+fn f(x: &'static Foo:Freeze) {
     c(x); //~ ERROR expected bounds `'static`
 }
 
diff --git a/src/test/run-pass/trait-bounds-in-arc.rs b/src/test/run-pass/trait-bounds-in-arc.rs
index 585c2185a7e..a3b2ea02db3 100644
--- a/src/test/run-pass/trait-bounds-in-arc.rs
+++ b/src/test/run-pass/trait-bounds-in-arc.rs
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 // Tests that a heterogeneous list of existential types can be put inside an ARC
-// and shared between tasks as long as all types fulfill Const+Owned.
+// and shared between tasks as long as all types fulfill Freeze+Send.
 
 // xfail-fast
 
@@ -64,10 +64,10 @@ fn main() {
     let dogge1 = Dogge { bark_decibels: 100, tricks_known: 42, name: ~"alan_turing" };
     let dogge2 = Dogge { bark_decibels: 55,  tricks_known: 11, name: ~"albert_einstein" };
     let fishe = Goldfyshe { swim_speed: 998, name: ~"alec_guinness" };
-    let arc = arc::ARC(~[~catte  as ~Pet:Const+Owned,
-                         ~dogge1 as ~Pet:Const+Owned,
-                         ~fishe  as ~Pet:Const+Owned,
-                         ~dogge2 as ~Pet:Const+Owned]);
+    let arc = arc::ARC(~[~catte  as ~Pet:Freeze+Send,
+                         ~dogge1 as ~Pet:Freeze+Send,
+                         ~fishe  as ~Pet:Freeze+Send,
+                         ~dogge2 as ~Pet:Freeze+Send]);
     let (p1,c1) = comm::stream();
     let arc1 = cell::Cell::new(arc.clone());
     do task::spawn { check_legs(arc1.take()); c1.send(()); }
@@ -82,21 +82,21 @@ fn main() {
     p3.recv();
 }
 
-fn check_legs(arc: arc::ARC<~[~Pet:Const+Owned]>) {
+fn check_legs(arc: arc::ARC<~[~Pet:Freeze+Send]>) {
     let mut legs = 0;
     for arc.get().iter().advance |pet| {
         legs += pet.num_legs();
     }
     assert!(legs == 12);
 }
-fn check_names(arc: arc::ARC<~[~Pet:Const+Owned]>) {
+fn check_names(arc: arc::ARC<~[~Pet:Freeze+Send]>) {
     for arc.get().iter().advance |pet| {
         do pet.name |name| {
             assert!(name[0] == 'a' as u8 && name[1] == 'l' as u8);
         }
     }
 }
-fn check_pedigree(arc: arc::ARC<~[~Pet:Const+Owned]>) {
+fn check_pedigree(arc: arc::ARC<~[~Pet:Freeze+Send]>) {
     for arc.get().iter().advance |pet| {
         assert!(pet.of_good_pedigree());
     }