]> git.lizzy.rs Git - rust.git/commitdiff
auto merge of #13748 : hjr3/rust/guide-container-update, r=alexcrichton
authorbors <bors@rust-lang.org>
Sat, 26 Apr 2014 03:06:32 +0000 (20:06 -0700)
committerbors <bors@rust-lang.org>
Sat, 26 Apr 2014 03:06:32 +0000 (20:06 -0700)
26 files changed:
mk/docs.mk
src/doc/FiraSans-Medium.woff [new file with mode: 0644]
src/doc/FiraSans-Regular.woff [new file with mode: 0644]
src/doc/Heuristica-Bold.woff [new file with mode: 0644]
src/doc/Heuristica-Italic.woff [new file with mode: 0644]
src/doc/Heuristica-Regular.woff [new file with mode: 0644]
src/doc/favicon.inc
src/doc/intro.md
src/doc/rust.css
src/librustdoc/html/layout.rs
src/librustdoc/html/render.rs
src/librustdoc/html/static/main.css
src/libstd/num/f32.rs
src/libstd/num/f64.rs
src/libstd/num/mod.rs
src/test/run-make/extern-fn-reachable/Makefile [new file with mode: 0644]
src/test/run-make/extern-fn-reachable/dylib.rs [new file with mode: 0644]
src/test/run-make/extern-fn-reachable/main.rs [new file with mode: 0644]
src/test/run-pass/borrowck-nested-calls.rs
src/test/run-pass/extern-fn-reachable.rs [deleted file]
src/test/run-pass/int-conversion-coherence.rs [deleted file]
src/test/run-pass/select-macro.rs [deleted file]
src/test/run-pass/syntax-extension-shell.rs [deleted file]
src/test/run-pass/tag-align-dyn-u64.rs
src/test/run-pass/tag-align-dyn-variants.rs
src/test/run-pass/tag-align-u64.rs

index 9c79e1e864253cca4c6727b1e9ac194d605117d2..3e032d597280530a4d431d6c317c1bfbf84c5e2f 100644 (file)
@@ -141,6 +141,26 @@ doc/footer.inc: $(D)/footer.inc | doc/
        @$(call E, cp: $@)
        $(Q)cp -a $< $@ 2> /dev/null
 
+doc/FiraSans-Regular.woff: $(D)/FiraSans-Regular.woff | doc/
+       @$(call E, cp: $@)
+       $(Q)cp -a $< $@ 2> /dev/null
+
+doc/FiraSans-Medium.woff: $(D)/FiraSans-Medium.woff | doc/
+       @$(call E, cp: $@)
+       $(Q)cp -a $< $@ 2> /dev/null
+
+doc/Heuristica-Regular.woff: $(D)/Heuristica-Regular.woff | doc/
+       @$(call E, cp: $@)
+       $(Q)cp -a $< $@ 2> /dev/null
+
+doc/Heuristica-Italic.woff: $(D)/Heuristica-Italic.woff | doc/
+       @$(call E, cp: $@)
+       $(Q)cp -a $< $@ 2> /dev/null
+
+doc/Heuristica-Bold.woff: $(D)/Heuristica-Bold.woff | doc/
+       @$(call E, cp: $@)
+       $(Q)cp -a $< $@ 2> /dev/null
+
 # The (english) documentation for each doc item.
 
 define DEF_SHOULD_BUILD_PDF_DOC
diff --git a/src/doc/FiraSans-Medium.woff b/src/doc/FiraSans-Medium.woff
new file mode 100644 (file)
index 0000000..5627227
Binary files /dev/null and b/src/doc/FiraSans-Medium.woff differ
diff --git a/src/doc/FiraSans-Regular.woff b/src/doc/FiraSans-Regular.woff
new file mode 100644 (file)
index 0000000..9ff4044
Binary files /dev/null and b/src/doc/FiraSans-Regular.woff differ
diff --git a/src/doc/Heuristica-Bold.woff b/src/doc/Heuristica-Bold.woff
new file mode 100644 (file)
index 0000000..1c952d1
Binary files /dev/null and b/src/doc/Heuristica-Bold.woff differ
diff --git a/src/doc/Heuristica-Italic.woff b/src/doc/Heuristica-Italic.woff
new file mode 100644 (file)
index 0000000..b0cebf0
Binary files /dev/null and b/src/doc/Heuristica-Italic.woff differ
diff --git a/src/doc/Heuristica-Regular.woff b/src/doc/Heuristica-Regular.woff
new file mode 100644 (file)
index 0000000..8d824e6
Binary files /dev/null and b/src/doc/Heuristica-Regular.woff differ
index b68c58c9b6176685c5ed62927268143de98d6e37..a11e5cc956831c12053edb83df2658d0e2444ff0 100644 (file)
@@ -1 +1,3 @@
-<link rel="shortcut icon" href="http://www.rust-lang.org/favicon.ico" />
+<link rel="shortcut icon" href="http://www.rust-lang.org/favicon.ico">
+<link href='http://fonts.googleapis.com/css?family=Source+Code+Pro:400'
+        rel='stylesheet' type='text/css'>
\ No newline at end of file
index 513f4ab22e3ebe0953c49f93faebb0ce22dc8d88..5b36856660dae03787ee253861bc4f95bd513e83 100644 (file)
@@ -217,7 +217,7 @@ a `Sender` and `Receiver` (commonly abbreviated `tx` and `rx`).
 The `spawn` function spins up a new task,
 given a *heap allocated closure* to run.
 As you can see in the code,
-we call `chan.send()` from the original task,
+we call `tx.send()` from the original task,
 passing in our boxed array,
 and we call `rx.recv()` (short for 'receive') inside of the new task:
 values given to the `Sender` via the `send` method come out the other end via the `recv` method on the `Receiver`.
index b581dc2cce82b708e9f0c8c1b84e432406cf1a76..d60dd54a67d1495808822535cf65691428082b1e 100644 (file)
     font-family: 'Fira Sans';
     font-style: normal;
     font-weight: 400;
-    src: local('Fira Sans'), url("http://www.rust-lang.org/fonts/FiraSans-Regular.woff") format('woff');
+    src: local('Fira Sans'), url("FiraSans-Regular.woff") format('woff');
 }
 @font-face {
     font-family: 'Fira Sans';
     font-style: normal;
     font-weight: 500;
-    src: local('Fira Sans Medium'), url("http://www.rust-lang.org/fonts/FiraSans-Medium.woff") format('woff');
+    src: local('Fira Sans Medium'), url("FiraSans-Medium.woff") format('woff');
 }
 @font-face {
     font-family: 'Heuristica';
     font-style: normal;
     font-weight: 400;
-    src: local('Heuristica Regular'), url("http://www.rust-lang.org/fonts/Heuristica-Regular.woff") format('woff');
+    src: local('Heuristica Regular'), url("Heuristica-Regular.woff") format('woff');
 }
 @font-face {
     font-family: 'Heuristica';
     font-style: italic;
     font-weight: 400;
-    src: local('Heuristica Italic'), url("http://www.rust-lang.org/fonts/Heuristica-Italic.woff") format('woff');
+    src: local('Heuristica Italic'), url("Heuristica-Italic.woff") format('woff');
 }
 @font-face {
     font-family: 'Heuristica';
     font-style: normal;
     font-weight: 700;
-    src: local('Heuristica Bold'), url("http://www.rust-lang.org/fonts/Heuristica-Bold.woff") format('woff');
+    src: local('Heuristica Bold'), url("Heuristica-Bold.woff") format('woff');
 }
-/* Global page semantics
-   ========================================================================== */
+
+*:not(body) {
+  -webkit-box-sizing: border-box;
+     -moz-box-sizing: border-box;
+          box-sizing: border-box;
+}
+
+/* General structure */
+
 body {
     margin: 0 auto;
     padding: 0 15px;
@@ -71,16 +78,6 @@ h1, h2, h3 {
 h1 {
     margin-bottom: 20px;
 }
-@media (min-width: 1170px) {
-    h1 {
-        margin-top: 40px;
-        margin-bottom: 30px;
-    }
-    h1, h2, h3 {
-        margin-top: 30px;
-        margin-bottom: 15px;
-    }
-}
 h4, h5, h6 {
     margin-top: 12px;
     margin-bottom: 10px;
@@ -157,8 +154,8 @@ footer {
     margin-bottom: 1em;
 }
 
-/* Links layout
-   ========================================================================== */
+/* Links layout */
+
 a {
     text-decoration: none;
     color: #428BCA;
@@ -183,18 +180,16 @@ h5 a:link, h5 a:visited {color: black;}
 h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover,
 h5 a:hover {text-decoration: none;}
 
-/* Code
-   ========================================================================== */
+/* Code */
+
 pre, code {
-    font-family: Menlo, Monaco, Consolas, "DejaVu Sans Mono", monospace;
-    border-radius: 4px;
+    font-family: "Source Code Pro", Menlo, Monaco, Consolas, "DejaVu Sans Mono", monospace;
 }
 pre {
-    background-color: #FDFDFD;
-    border: 1px solid #CCC;
-    border-radius: 0.5em;
+    border-left: 2px solid #eee;
     white-space: pre-wrap;
-    padding: 9.5px;
+    padding: 14px;
+    padding-right: 0;
     margin: 20px 0;
     font-size: 13px;
     word-break: break-all;
@@ -203,15 +198,12 @@ pre {
 code {
     padding: 0 2px;
     color: #8D1A38;
-    white-space: nowrap;
+    white-space: pre-wrap;
 }
 pre code {
     padding: 0;
     font-size: inherit;
     color: inherit;
-    white-space: pre-wrap;
-    background-color: transparent;
-    border-radius: 0;
 }
 
 /* Code highlighting */
@@ -225,16 +217,16 @@ pre.rust .doccomment { color: #4D4D4C; }
 pre.rust .macro, pre.rust .macro-nonterminal { color: #3E999F; }
 pre.rust .lifetime { color: #B76514; }
 
+/* The rest */
 
-/* The rest
-   ========================================================================== */
 #versioninfo {
     text-align: center;
     margin: 0.5em;
     font-size: 1.1em;
 }
-@media only screen and (min-width: 768px) {
+@media (min-width: 992px) {
     #versioninfo {
+        font-size: 0.8em;
         position: fixed;
         bottom: 0px;
         right: 0px;
@@ -243,7 +235,7 @@ pre.rust .lifetime { color: #B76514; }
         background-color: #fff;
         margin: 2px;
         padding: 0 2px;
-        border-radius: .3em;
+        border-radius: .2em;
     }
 }
 #versioninfo a.hash {
@@ -252,10 +244,12 @@ pre.rust .lifetime { color: #B76514; }
 }
 
 blockquote {
-    color: black;
-    border-left: 5px solid #eee;
-    margin: 0 0 20px;
-    padding: 10px 20px;
+    color: #000;
+    margin: 20px 0;
+    padding: 15px 20px;
+    background-color: #f2f7f9;
+    border-top: .1em solid #e5eef2;
+    border-bottom: .1em solid #e5eef2;
 }
 blockquote p {
     font-size: 17px;
@@ -319,6 +313,12 @@ table th {
     padding: 5px;
 }
 
+@media (min-width: 1170px) {
+    pre {
+        font-size: 15px;
+    }
+}
+
 @media print {
     * {
         text-shadow: none !important;
index d0cfabc8c1106c21f7136e7be1d38dde3d5acd92..7cfc307debed5b6ed54522bf53f25cfb9c2ad883 100644 (file)
@@ -38,11 +38,11 @@ pub fn render<T: fmt::Show, S: fmt::Show>(
 
     <title>{title}</title>
 
-    <link href='http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,600'
+    <link href='http://fonts.googleapis.com/css?family=Source+Code+Pro:400,600'
           rel='stylesheet' type='text/css'>
     <link rel="stylesheet" type="text/css" href="{root_path}main.css">
 
-    {favicon, select, none{} other{<link rel="shortcut icon" href="#" />}}
+    {favicon, select, none{} other{<link rel="shortcut icon" href="#">}}
 </head>
 <body>
     <!--[if lte IE 8]>
index d65876a1c834df709492e5a2230ba3c4e7aa2ebd..539eb42305c77c278c4b5339b1d257530f3d0a18 100644 (file)
@@ -924,19 +924,6 @@ fn ismodule(&self) -> bool {
 
 impl<'a> fmt::Show for Item<'a> {
     fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
-        match attr::find_stability(self.item.attrs.iter()) {
-            Some(ref stability) => {
-                try!(write!(fmt.buf,
-                       "<a class='stability {lvl}' title='{reason}'>{lvl}</a>",
-                       lvl = stability.level.to_str(),
-                       reason = match stability.text {
-                           Some(ref s) => (*s).clone(),
-                           None => InternedString::new(""),
-                       }));
-            }
-            None => {}
-        }
-
         // Write the breadcrumb trail header for the top
         try!(write!(fmt.buf, "\n<h1 class='fqn'>"));
         match self.item.inner {
@@ -964,6 +951,21 @@ fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
         try!(write!(fmt.buf, "<a class='{}' href=''>{}</a>",
                       shortty(self.item), self.item.name.get_ref().as_slice()));
 
+        // Write stability attributes
+        match attr::find_stability(self.item.attrs.iter()) {
+            Some(ref stability) => {
+                try!(write!(fmt.buf,
+                       "<a class='stability {lvl}' title='{reason}'>{lvl}</a>",
+                       lvl = stability.level.to_str(),
+                       reason = match stability.text {
+                           Some(ref s) => (*s).clone(),
+                           None => InternedString::new(""),
+                       }));
+            }
+            None => {}
+        }
+
+        // Write `src` tag
         if self.cx.include_sources {
             let mut path = Vec::new();
             clean_srcpath(self.item.source.filename.as_bytes(), |component| {
index 9a0b991237397c4612b23ce16d8333d3145840cc..b5ce3919bdd79bf790fbf1b39cdb45f12be37706 100644 (file)
     font-family: 'Fira Sans';
     font-style: normal;
     font-weight: 400;
-    src: local('Fira Sans'), url("http://www.rust-lang.org/fonts/FiraSans-Regular.woff") format('woff');
+    src: local('Fira Sans'), url("FiraSans-Regular.woff") format('woff');
 }
 @font-face {
     font-family: 'Fira Sans';
     font-style: normal;
     font-weight: 500;
-    src: local('Fira Sans Medium'), url("http://www.rust-lang.org/fonts/FiraSans-Medium.woff") format('woff');
+    src: local('Fira Sans Medium'), url("FiraSans-Medium.woff") format('woff');
 }
 @font-face {
     font-family: 'Heuristica';
     font-style: normal;
     font-weight: 400;
-    src: local('Heuristica Regular'), url("http://www.rust-lang.org/fonts/Heuristica-Regular.woff") format('woff');
+    src: local('Heuristica Regular'), url("Heuristica-Regular.woff") format('woff');
 }
 @font-face {
     font-family: 'Heuristica';
     font-style: italic;
     font-weight: 400;
-    src: local('Heuristica Italic'), url("http://www.rust-lang.org/fonts/Heuristica-Italic.woff") format('woff');
+    src: local('Heuristica Italic'), url("Heuristica-Italic.woff") format('woff');
 }
 @font-face {
     font-family: 'Heuristica';
     font-style: normal;
     font-weight: 700;
-    src: local('Heuristica Bold'), url("http://www.rust-lang.org/fonts/Heuristica-Bold.woff") format('woff');
+    src: local('Heuristica Bold'), url("Heuristica-Bold.woff") format('woff');
 }
 
 @import "normalize.css";
@@ -63,7 +63,7 @@ body {
 h1, h2, h3:not(.impl), h4:not(.method) {
     color: black;
     font-weight: 500;
-    margin: 30px 0 20px 0;
+    margin: 30px 0 15px 0;
     padding-bottom: 6px;
 }
 h1.fqn {
@@ -81,7 +81,7 @@ h3.impl, h4.method {
 h3.impl {
     margin-top: 15px;
 }
-h1, h2, h3, h4, section.sidebar, a.source, .content a.mod, .search-input {
+h1, h2, h3, h4, section.sidebar, a.source, .search-input, .content table a {
     font-family: "Fira Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
 }
 
@@ -98,9 +98,18 @@ p {
 
 code, pre {
     font-family: "Source Code Pro", Menlo, Monaco, Consolas, "DejaVu Sans Mono", Inconsolata, monospace;
+    white-space: pre-wrap;
 }
 pre {
     font-size: 15px;
+    padding: 14px;
+    padding-right: 0;
+    border-left: 2px solid #eee;
+}
+
+.source pre {
+    border-left: none;
+    padding: 20px;
 }
 
 nav.sub {
@@ -164,7 +173,6 @@ nav.sub {
     padding: 20px 0;
 }
 
-.content pre { padding: 20px; }
 .content.source pre.rust {
     white-space: pre;
     overflow: auto;
@@ -201,8 +209,7 @@ nav.sub {
 }
 
 .docblock h1, .docblock h2, .docblock h3, .docblock h4, .docblock h5 {
-    margin: 40px 0 10px 0;
-    padding: 10px 0;
+    margin: 30px 0 15px 0;
     border-bottom: 1px solid #DDD;
 }
 
@@ -356,10 +363,9 @@ a {
 .stability {
     border-left: 6px solid #000;
     border-radius: 3px;
-    padding: 8px 3px 8px 10px;
+    padding: 2px 10px;
     text-transform: lowercase;
-    display: block;
-    margin-bottom: 20px;
+    margin-left: 10px;
 }
 
 .stability.Deprecated { border-color: #D60027; color: #880017; }
@@ -371,8 +377,6 @@ a {
 
 :target { background: #FDFFD3; }
 
-pre.rust, pre.line-numbers { background-color: #F5F5F5; }
-
 /* Code highlighting */
 pre.rust .kw { color: #8959A8; }
 pre.rust .kw-2, pre.rust .prelude-ty { color: #4271AE; }
index 6df549dbc791b8e149b6f46814a7b4b1cb007d19..36e5728200bcb7bf44f93035e2a5a5e3a6aa39cb 100644 (file)
@@ -71,9 +71,11 @@ mod cmath {
 
 pub static EPSILON: f32 = 1.19209290e-07_f32;
 
-/// Minimum normalized f32 value
-pub static MIN_VALUE: f32 = 1.17549435e-38_f32;
-/// Maximum f32 value
+/// Smallest finite f32 value
+pub static MIN_VALUE: f32 = -3.40282347e+38_f32;
+/// Smallest positive, normalized f32 value
+pub static MIN_POS_VALUE: f32 = 1.17549435e-38_f32;
+/// Largest finite f32 value
 pub static MAX_VALUE: f32 = 3.40282347e+38_f32;
 
 pub static MIN_EXP: int = -125;
@@ -90,8 +92,9 @@ mod cmath {
 pub mod consts {
     // FIXME: replace with mathematical constants from cmath.
 
-    // FIXME(#11621): These constants should be deprecated once CTFE is
-    // implemented in favour of calling their respective functions in `Float`.
+    // FIXME(#5527): These constants should be deprecated once associated
+    // constants are implemented in favour of referencing the respective members
+    // of `Float`.
 
     /// Archimedes' constant
     pub static PI: f32 = 3.14159265358979323846264338327950288_f32;
@@ -342,6 +345,9 @@ fn min_10_exp(_: Option<f32>) -> int { MIN_10_EXP }
     #[inline]
     fn max_10_exp(_: Option<f32>) -> int { MAX_10_EXP }
 
+    #[inline]
+    fn min_pos_value(_: Option<f32>) -> f32 { MIN_POS_VALUE }
+
     /// Constructs a floating point number by multiplying `x` by 2 raised to the
     /// power of `exp`
     #[inline]
index 63ddb88f8dc2ad0f2879ad8ae1891c88e5a176dc..6523ac9e8a42129511ce2c4c8ce2bddec77d19af 100644 (file)
@@ -73,8 +73,9 @@ mod cmath {
     }
 }
 
-// FIXME(#11621): These constants should be deprecated once CTFE is implemented
-// in favour of calling their respective functions in `Bounded` and `Float`.
+// FIXME(#5527): These constants should be deprecated once associated
+// constants are implemented in favour of referencing the respective
+// members of `Bounded` and `Float`.
 
 pub static RADIX: uint = 2u;
 
@@ -83,9 +84,11 @@ mod cmath {
 
 pub static EPSILON: f64 = 2.2204460492503131e-16_f64;
 
-/// Minimum normalized f64 value
-pub static MIN_VALUE: f64 = 2.2250738585072014e-308_f64;
-/// Maximum f64 value
+/// Smallest finite f64 value
+pub static MIN_VALUE: f64 = -1.7976931348623157e+308_f64;
+/// Smallest positive, normalized f64 value
+pub static MIN_POS_VALUE: f64 = 2.2250738585072014e-308_f64;
+/// Largest finite f64 value
 pub static MAX_VALUE: f64 = 1.7976931348623157e+308_f64;
 
 pub static MIN_EXP: int = -1021;
@@ -104,8 +107,9 @@ mod cmath {
 pub mod consts {
     // FIXME: replace with mathematical constants from cmath.
 
-    // FIXME(#11621): These constants should be deprecated once CTFE is
-    // implemented in favour of calling their respective functions in `Float`.
+    // FIXME(#5527): These constants should be deprecated once associated
+    // constants are implemented in favour of referencing the respective members
+    // of `Float`.
 
     /// Archimedes' constant
     pub static PI: f64 = 3.14159265358979323846264338327950288_f64;
@@ -330,25 +334,28 @@ fn classify(self) -> FPCategory {
     }
 
     #[inline]
-    fn mantissa_digits(_: Option<f64>) -> uint { 53 }
+    fn mantissa_digits(_: Option<f64>) -> uint { MANTISSA_DIGITS }
 
     #[inline]
-    fn digits(_: Option<f64>) -> uint { 15 }
+    fn digits(_: Option<f64>) -> uint { DIGITS }
 
     #[inline]
-    fn epsilon() -> f64 { 2.2204460492503131e-16 }
+    fn epsilon() -> f64 { EPSILON }
 
     #[inline]
-    fn min_exp(_: Option<f64>) -> int { -1021 }
+    fn min_exp(_: Option<f64>) -> int { MIN_EXP }
 
     #[inline]
-    fn max_exp(_: Option<f64>) -> int { 1024 }
+    fn max_exp(_: Option<f64>) -> int { MAX_EXP }
 
     #[inline]
-    fn min_10_exp(_: Option<f64>) -> int { -307 }
+    fn min_10_exp(_: Option<f64>) -> int { MIN_10_EXP }
 
     #[inline]
-    fn max_10_exp(_: Option<f64>) -> int { 308 }
+    fn max_10_exp(_: Option<f64>) -> int { MAX_10_EXP }
+
+    #[inline]
+    fn min_pos_value(_: Option<f64>) -> f64 { MIN_POS_VALUE }
 
     /// Constructs a floating point number by multiplying `x` by 2 raised to the
     /// power of `exp`
index dccca82dc79abac4359c0bf1457aa252bee61df8..15269f6b86b7e1a4b0507eef7733881c6559726b 100644 (file)
@@ -190,7 +190,9 @@ pub fn pow<T: One + Mul<T, T>>(mut base: T, mut exp: uint) -> T {
 /// Numbers which have upper and lower bounds
 pub trait Bounded {
     // FIXME (#5527): These should be associated constants
+    /// returns the smallest finite number this type can represent
     fn min_value() -> Self;
+    /// returns the largest finite number this type can represent
     fn max_value() -> Self;
 }
 
@@ -356,6 +358,8 @@ pub trait Float: Signed + Primitive {
     /// Returns the category that this number falls into.
     fn classify(self) -> FPCategory;
 
+    // FIXME (#5527): These should be associated constants
+
     /// Returns the number of binary digits of mantissa that this type supports.
     fn mantissa_digits(unused_self: Option<Self>) -> uint;
     /// Returns the number of base-10 digits of precision that this type supports.
@@ -370,6 +374,8 @@ pub trait Float: Signed + Primitive {
     fn min_10_exp(unused_self: Option<Self>) -> int;
     /// Returns the maximum base-10 exponent that this type can represent.
     fn max_10_exp(unused_self: Option<Self>) -> int;
+    /// Returns the smallest normalized positive number that this type can represent.
+    fn min_pos_value(unused_self: Option<Self>) -> Self;
 
     /// Constructs a floating point number created by multiplying `x` by 2
     /// raised to the power of `exp`.
@@ -434,6 +440,8 @@ pub trait Float: Signed + Primitive {
     /// legs of length `x` and `y`.
     fn hypot(self, other: Self) -> Self;
 
+    // FIXME (#5527): These should be associated constants
+
     /// Archimedes' constant.
     fn pi() -> Self;
     /// 2.0 * pi.
diff --git a/src/test/run-make/extern-fn-reachable/Makefile b/src/test/run-make/extern-fn-reachable/Makefile
new file mode 100644 (file)
index 0000000..0560626
--- /dev/null
@@ -0,0 +1,6 @@
+-include ../tools.mk
+
+all:
+       $(RUSTC) dylib.rs -o $(TMPDIR)/libdylib.so
+       $(RUSTC) main.rs
+       $(call RUN,main)
diff --git a/src/test/run-make/extern-fn-reachable/dylib.rs b/src/test/run-make/extern-fn-reachable/dylib.rs
new file mode 100644 (file)
index 0000000..f24265e
--- /dev/null
@@ -0,0 +1,24 @@
+// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![crate_type = "dylib"]
+#![allow(dead_code)]
+
+#[no_mangle] pub extern "C" fn fun1() {}
+#[no_mangle] extern "C" fn fun2() {}
+
+mod foo {
+    #[no_mangle] pub extern "C" fn fun3() {}
+}
+pub mod bar {
+    #[no_mangle] pub extern "C" fn fun4() {}
+}
+
+#[no_mangle] pub fn fun5() {}
diff --git a/src/test/run-make/extern-fn-reachable/main.rs b/src/test/run-make/extern-fn-reachable/main.rs
new file mode 100644 (file)
index 0000000..e05d431
--- /dev/null
@@ -0,0 +1,24 @@
+// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+use std::unstable::dynamic_lib::DynamicLibrary;
+use std::os;
+
+pub fn main() {
+    unsafe {
+        let path = Path::new("libdylib.so");
+        let a = DynamicLibrary::open(Some(&path)).unwrap();
+        assert!(a.symbol::<int>("fun1").is_ok());
+        assert!(a.symbol::<int>("fun2").is_err());
+        assert!(a.symbol::<int>("fun3").is_err());
+        assert!(a.symbol::<int>("fun4").is_ok());
+        assert!(a.symbol::<int>("fun5").is_ok());
+    }
+}
index 993b8d506d25e67fb5bb1ccdd1dc0e65bf62bfe9..315f6c80d4e11cb36277ee10166394c68abaedcf 100644 (file)
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// ignore-test FIXME (#5074) nested method calls
+// ignore-test FIXME (#6268) nested method calls
 
 // Test that (safe) nested calls with `&mut` receivers are permitted.
 
diff --git a/src/test/run-pass/extern-fn-reachable.rs b/src/test/run-pass/extern-fn-reachable.rs
deleted file mode 100644 (file)
index 6150138..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// ignore-win32 dynamic_lib can read dllexported symbols only
-// ignore-linux apparently dlsym doesn't work on program symbols?
-// ignore-android apparently dlsym doesn't work on program symbols?
-// ignore-freebsd apparently dlsym doesn't work on program symbols?
-
-use std::unstable::dynamic_lib::DynamicLibrary;
-
-#[no_mangle] pub extern "C" fn fun1() {}
-#[no_mangle] extern "C" fn fun2() {}
-
-mod foo {
-    #[no_mangle] pub extern "C" fn fun3() {}
-}
-pub mod bar {
-    #[no_mangle] pub extern "C" fn fun4() {}
-}
-
-#[no_mangle] pub fn fun5() {}
-
-pub fn main() {
-    unsafe {
-        let a = DynamicLibrary::open(None).unwrap();
-        assert!(a.symbol::<int>("fun1").is_ok());
-        assert!(a.symbol::<int>("fun2").is_err());
-        assert!(a.symbol::<int>("fun3").is_err());
-        assert!(a.symbol::<int>("fun4").is_ok());
-        assert!(a.symbol::<int>("fun5").is_err());
-    }
-}
diff --git a/src/test/run-pass/int-conversion-coherence.rs b/src/test/run-pass/int-conversion-coherence.rs
deleted file mode 100644 (file)
index ad414be..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// ignore-test
-//
-// Problem here is that transactions aren't implemented for integer literal
-// inference.
-
-trait plus {
-    fn plus() -> int;
-}
-
-impl foo of plus for uint { fn plus() -> int { self as int + 20 } }
-impl foo of plus for int { fn plus() -> int { self + 10 } }
-
-pub fn main() {
-    assert_eq!(10.plus(), 20);
-}
diff --git a/src/test/run-pass/select-macro.rs b/src/test/run-pass/select-macro.rs
deleted file mode 100644 (file)
index 7ab36c6..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-// ignore-test - this isn't really a test.
-
- {
-
-// select!
-macro_rules! select_if (
-
-    {
-        $index:expr,
-        $count:expr
-    } => {
-        fail!()
-    };
-
-    {
-        $index:expr,
-        $count:expr,
-        $port:path => [
-            $(type_this $message:path$(($(x $x: ident),+))dont_type_this*
-              -> $next:ident => { $e:expr }),+
-        ]
-        $(, $ports:path => [
-            $(type_this $messages:path$(($(x $xs: ident),+))dont_type_this*
-              -> $nexts:ident => { $es:expr }),+
-        ] )*
-    } => {
-        if $index == $count {
-            match pipes::try_recv($port) {
-              $(Some($message($($($x,)+)* next)) => {
-                let $next = next;
-                $e
-              })+
-              _ => fail!()
-            }
-        } else {
-            select_if!(
-                $index,
-                $count + 1
-                $(, $ports => [
-                    $(type_this $messages$(($(x $xs),+))dont_type_this*
-                      -> $nexts => { $es }),+
-                ])*
-            )
-        }
-    };
-)
-
-macro_rules! select (
-    {
-        $( $port:path => {
-            $($message:path$(($($x: ident),+))dont_type_this*
-              -> $next:ident $e:expr),+
-        } )+
-    } => {
-        let index = pipes::selecti([$(($port).header()),+]);
-        select_if!(index, 0 $(, $port => [
-            $(type_this $message$(($(x $x),+))dont_type_this* -> $next => { $e }),+
-        ])+)
-    }
-)
-
-}
diff --git a/src/test/run-pass/syntax-extension-shell.rs b/src/test/run-pass/syntax-extension-shell.rs
deleted file mode 100644 (file)
index 15c8b7a..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-// ignore-test
-
-pub fn main() {
-  let s = shell!( uname -a );
-  log(debug, s);
-}
index 60786075697baedb330f6e2778aa86df12f5c5d4..72f2917a2129acd75b0e404272fa2e36c2d2cfb1 100644 (file)
@@ -8,24 +8,26 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// ignore-test #7340 fails on 32-bit linux
-use std::ptr;
+// ignore-linux #7340 fails on 32-bit linux
+// ignore-macos #7340 fails on 32-bit macos
 
-enum a_tag<A> {
-    a_tag(A)
+use std::cast;
+
+enum Tag<A> {
+    Tag(A)
 }
 
-struct t_rec {
+struct Rec {
     c8: u8,
-    t: a_tag<u64>
+    t: Tag<u64>
 }
 
-fn mk_rec() -> t_rec {
-    return t_rec { c8:0u8, t:a_tag(0u64) };
+fn mk_rec() -> Rec {
+    return Rec { c8:0u8, t:Tag(0u64) };
 }
 
-fn is_8_byte_aligned(u: &a_tag<u64>) -> bool {
-    let p = ptr::to_unsafe_ptr(u) as uint;
+fn is_8_byte_aligned(u: &Tag<u64>) -> bool {
+    let p: uint = unsafe { cast::transmute(u) };
     return (p & 7u) == 0u;
 }
 
index 41ae28f0a9d942c3aac18f7c6698be617b791d9b..70590b768b1d671e00a57d23e7ff76dfd147af04 100644 (file)
@@ -8,34 +8,36 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// ignore-test #7340 fails on 32-bit linux
-use std::ptr;
+// ignore-linux #7340 fails on 32-bit linux
+// ignore-macos #7340 fails on 32-bit macos
 
-enum a_tag<A,B> {
-    varA(A),
-    varB(B)
+use std::cast;
+
+enum Tag<A,B> {
+    VarA(A),
+    VarB(B),
 }
 
-struct t_rec<A,B> {
+struct Rec<A,B> {
     chA: u8,
-    tA: a_tag<A,B>,
+    tA: Tag<A,B>,
     chB: u8,
-    tB: a_tag<A,B>
+    tB: Tag<A,B>,
 }
 
-fn mk_rec<A,B>(a: A, b: B) -> t_rec<A,B> {
-    return t_rec{ chA:0u8, tA:varA(a), chB:1u8, tB:varB(b) };
+fn mk_rec<A,B>(a: A, b: B) -> Rec<A,B> {
+    Rec { chA:0u8, tA:VarA(a), chB:1u8, tB:VarB(b) }
 }
 
 fn is_aligned<A>(amnt: uint, u: &A) -> bool {
-    let p = ptr::to_unsafe_ptr(u) as uint;
+    let p: uint = unsafe { cast::transmute(u) };
     return (p & (amnt-1u)) == 0u;
 }
 
-fn variant_data_is_aligned<A,B>(amnt: uint, u: &a_tag<A,B>) -> bool {
+fn variant_data_is_aligned<A,B>(amnt: uint, u: &Tag<A,B>) -> bool {
     match u {
-      &varA(ref a) => is_aligned(amnt, a),
-      &varB(ref b) => is_aligned(amnt, b)
+      &VarA(ref a) => is_aligned(amnt, a),
+      &VarB(ref b) => is_aligned(amnt, b)
     }
 }
 
index 351c2dec99b7e1bf763ab5a449ff19f4ad670653..4c126d68fef90ad0375dc52865c48f9f40f89d24 100644 (file)
@@ -8,25 +8,27 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// ignore-test #7340 fails on 32-bit linux
-use std::ptr;
+// ignore-linux #7340 fails on 32-bit linux
+// ignore-macos #7340 fails on 32-bit macos
 
-enum a_tag {
-    a_tag(u64)
+use std::cast;
+
+enum Tag {
+    Tag(u64)
 }
 
-struct t_rec {
+struct Rec {
     c8: u8,
-    t: a_tag
+    t: Tag
 }
 
-fn mk_rec() -> t_rec {
-    return t_rec { c8:0u8, t:a_tag(0u64) };
+fn mk_rec() -> Rec {
+    return Rec { c8:0u8, t:Tag(0u64) };
 }
 
-fn is_8_byte_aligned(u: &a_tag) -> bool {
-    let p = ptr::to_unsafe_ptr(u) as u64;
-    return (p & 7u64) == 0u64;
+fn is_8_byte_aligned(u: &Tag) -> bool {
+    let p: uint = unsafe { cast::transmute(u) };
+    return (p & 7u) == 0u;
 }
 
 pub fn main() {