mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-10 05:53:10 +00:00
commit
8519139ab4
7
configure
vendored
7
configure
vendored
@ -133,12 +133,13 @@ probe() {
|
||||
}
|
||||
|
||||
probe_need() {
|
||||
local V=$1
|
||||
probe $*
|
||||
local V=$1
|
||||
shift
|
||||
eval VV=\$$V
|
||||
if [ -z "$VV" ]
|
||||
then
|
||||
err "needed, but unable to find any of: $*"
|
||||
err "$V needed, but unable to find any of: $*"
|
||||
fi
|
||||
}
|
||||
|
||||
@ -725,7 +726,7 @@ if [ -n "$CFG_ENABLE_ORBIT" ]; then putvar CFG_ENABLE_ORBIT; fi
|
||||
|
||||
step_msg "looking for build programs"
|
||||
|
||||
probe_need CFG_CURLORWGET curl wget
|
||||
probe_need CFG_CURL curl
|
||||
if [ -z "$CFG_PYTHON_PROVIDED" ]; then
|
||||
probe_need CFG_PYTHON python2.7 python2 python
|
||||
fi
|
||||
|
@ -2,7 +2,6 @@
|
||||
authors = ["The Rust Project Developers"]
|
||||
name = "core"
|
||||
version = "0.0.0"
|
||||
build = "build.rs"
|
||||
|
||||
[lib]
|
||||
name = "core"
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
//! rustc compiler intrinsics.
|
||||
//!
|
||||
//! The corresponding definitions are in librustc_trans/trans/intrinsic.rs.
|
||||
//! The corresponding definitions are in librustc_trans/intrinsic.rs.
|
||||
//!
|
||||
//! # Volatiles
|
||||
//!
|
||||
|
@ -1029,6 +1029,30 @@ struct Bar2; // ok!
|
||||
```
|
||||
"##,
|
||||
|
||||
E0429: r##"
|
||||
The `self` keyword cannot appear alone as the last segment in a `use`
|
||||
declaration.
|
||||
|
||||
Example of erroneous code:
|
||||
|
||||
```compile_fail
|
||||
use std::fmt::self; // error: `self` imports are only allowed within a { } list
|
||||
```
|
||||
|
||||
To use a namespace itself in addition to some of its members, `self` may appear
|
||||
as part of a brace-enclosed list of imports:
|
||||
|
||||
```
|
||||
use std::fmt::{self, Debug};
|
||||
```
|
||||
|
||||
If you only want to import the namespace, do so directly:
|
||||
|
||||
```
|
||||
use std::fmt;
|
||||
```
|
||||
"##,
|
||||
|
||||
E0430: r##"
|
||||
The `self` import appears more than once in the list. Erroneous code example:
|
||||
|
||||
@ -1235,5 +1259,4 @@ register_diagnostics! {
|
||||
E0420, // is not an associated const
|
||||
E0421, // unresolved associated const
|
||||
E0427, // cannot use `ref` binding mode with ...
|
||||
E0429, // `self` imports are only allowed within a { } list
|
||||
}
|
||||
|
@ -30,13 +30,13 @@
|
||||
|
||||
use core::char::CharExt as C;
|
||||
use core::fmt;
|
||||
use tables::{derived_property, property, general_category, conversions};
|
||||
use tables::{conversions, derived_property, general_category, property};
|
||||
|
||||
// stable reexports
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub use core::char::{MAX, from_u32, from_u32_unchecked, from_digit};
|
||||
pub use core::char::{MAX, from_digit, from_u32, from_u32_unchecked};
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub use core::char::{EscapeUnicode, EscapeDefault, EncodeUtf8, EncodeUtf16};
|
||||
pub use core::char::{EncodeUtf16, EncodeUtf8, EscapeDefault, EscapeUnicode};
|
||||
|
||||
// unstable reexports
|
||||
#[unstable(feature = "unicode", issue = "27783")]
|
||||
@ -808,16 +808,18 @@ pub fn decode_utf16<I: IntoIterator<Item = u16>>(iter: I) -> DecodeUtf16<I::Into
|
||||
}
|
||||
|
||||
#[stable(feature = "decode_utf16", since = "1.9.0")]
|
||||
impl<I: Iterator<Item=u16>> Iterator for DecodeUtf16<I> {
|
||||
impl<I: Iterator<Item = u16>> Iterator for DecodeUtf16<I> {
|
||||
type Item = Result<char, DecodeUtf16Error>;
|
||||
|
||||
fn next(&mut self) -> Option<Result<char, DecodeUtf16Error>> {
|
||||
let u = match self.buf.take() {
|
||||
Some(buf) => buf,
|
||||
None => match self.iter.next() {
|
||||
Some(u) => u,
|
||||
None => return None,
|
||||
},
|
||||
None => {
|
||||
match self.iter.next() {
|
||||
Some(u) => u,
|
||||
None => return None,
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
if u < 0xD800 || 0xDFFF < u {
|
||||
|
@ -43,14 +43,14 @@ pub mod char;
|
||||
|
||||
#[allow(deprecated)]
|
||||
pub mod str {
|
||||
pub use u_str::{UnicodeStr, SplitWhitespace};
|
||||
pub use u_str::{utf8_char_width, is_utf16};
|
||||
pub use u_str::{Utf16Encoder};
|
||||
pub use u_str::{SplitWhitespace, UnicodeStr};
|
||||
pub use u_str::{is_utf16, utf8_char_width};
|
||||
pub use u_str::Utf16Encoder;
|
||||
}
|
||||
|
||||
// For use in libcollections, not re-exported in libstd.
|
||||
pub mod derived_property {
|
||||
pub use tables::derived_property::{Cased, Case_Ignorable};
|
||||
pub use tables::derived_property::{Case_Ignorable, Cased};
|
||||
}
|
||||
|
||||
// For use in libsyntax
|
||||
|
@ -144,7 +144,9 @@ impl<I> Utf16Encoder<I> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<I> Iterator for Utf16Encoder<I> where I: Iterator<Item=char> {
|
||||
impl<I> Iterator for Utf16Encoder<I>
|
||||
where I: Iterator<Item = char>
|
||||
{
|
||||
type Item = u16;
|
||||
|
||||
#[inline]
|
||||
|
@ -409,8 +409,8 @@ a {
|
||||
|
||||
.content span.enum, .content a.enum, .block a.current.enum { color: #5e9766; }
|
||||
.content span.struct, .content a.struct, .block a.current.struct { color: #df3600; }
|
||||
.content a.type { color: #e57300; }
|
||||
.content a.macro { color: #068000; }
|
||||
.content span.type, .content a.type, .block a.current.type { color: #e57300; }
|
||||
.content span.macro, .content a.macro, .block a.current.macro { color: #068000; }
|
||||
.block a.current.crate { font-weight: 500; }
|
||||
|
||||
.search-input {
|
||||
@ -453,7 +453,7 @@ a {
|
||||
.content .search-results td:first-child { padding-right: 0; }
|
||||
.content .search-results td:first-child a { padding-right: 10px; }
|
||||
|
||||
tr.result span.primitive::after { content: ' (primitive type)'; font-style: italic; }
|
||||
tr.result span.primitive::after { content: ' (primitive type)'; font-style: italic; color: black}
|
||||
|
||||
body.blur > :not(#help) {
|
||||
filter: blur(8px);
|
||||
|
@ -88,8 +88,9 @@ pre {
|
||||
border-bottom-color: #ddd;
|
||||
}
|
||||
|
||||
.content a.primitive { color: #39a7bf; }
|
||||
.content span.externcrate, span.mod, .content a.mod, block a.current.mod { color: #4d76ae; }
|
||||
.content span.primitive, .content a.primitive, .block a.current.primitive { color: #39a7bf; }
|
||||
.content span.externcrate,
|
||||
.content span.mod, .content a.mod, .block a.current.mod { color: #4d76ae; }
|
||||
.content span.fn, .content a.fn, .block a.current.fn,
|
||||
.content span.method, .content a.method, .block a.current.method,
|
||||
.content span.tymethod, .content a.tymethod, .block a.current.tymethod,
|
||||
|
@ -11,7 +11,7 @@
|
||||
#![allow(missing_docs)]
|
||||
#![allow(deprecated)] // Float
|
||||
|
||||
use std::cmp::Ordering::{self, Less, Greater, Equal};
|
||||
use std::cmp::Ordering::{self, Equal, Greater, Less};
|
||||
use std::mem;
|
||||
|
||||
fn local_cmp(x: f64, y: f64) -> Ordering {
|
||||
@ -35,7 +35,6 @@ fn local_sort(v: &mut [f64]) {
|
||||
|
||||
/// Trait that provides simple descriptive statistics on a univariate set of numeric samples.
|
||||
pub trait Stats {
|
||||
|
||||
/// Sum of the samples.
|
||||
///
|
||||
/// Note: this method sacrifices performance at the altar of accuracy
|
||||
|
@ -8,10 +8,10 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![deny(warnings)]
|
||||
// error-pattern: calls in statics are limited
|
||||
|
||||
static S : u64 = { { panic!("foo"); 0 } };
|
||||
|
||||
fn main() {
|
||||
// Remove this whenever snapshots and rustbuild nightlies are synced.
|
||||
println!("cargo:rustc-cfg=cargobuild");
|
||||
println!("cargo:rerun-if-changed=build.rs")
|
||||
println!("{:?}", S);
|
||||
}
|
Loading…
Reference in New Issue
Block a user