Skip to content

Commit 8191b78

Browse files
committed
---
yaml --- r: 233853 b: refs/heads/beta c: ef48530 h: refs/heads/master i: 233851: d348275 v: v3
1 parent 7c6b0f8 commit 8191b78

File tree

11 files changed

+10
-144
lines changed

11 files changed

+10
-144
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
2323
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
2424
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26-
refs/heads/beta: 6a69bdd9e92051d7efb9babb509027e522cc4f4c
26+
refs/heads/beta: ef4853041a091f928a44aac28abf431965ce6fa2
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: 370fe2786109360f7c35b8ba552b83b773dd71d6
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/src/libcollectionstest/str.rs

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -833,37 +833,6 @@ fn test_bytes_revator() {
833833
}
834834
}
835835

836-
#[test]
837-
fn test_bytesator_nth() {
838-
let s = "ศไทย中华Việt Nam";
839-
let v = [
840-
224, 184, 168, 224, 185, 132, 224, 184, 151, 224, 184, 162, 228,
841-
184, 173, 229, 141, 142, 86, 105, 225, 187, 135, 116, 32, 78, 97,
842-
109
843-
];
844-
845-
let mut b = s.bytes();
846-
assert_eq!(b.nth(2).unwrap(), v[2]);
847-
assert_eq!(b.nth(10).unwrap(), v[10]);
848-
assert_eq!(b.nth(200), None);
849-
}
850-
851-
#[test]
852-
fn test_bytesator_count() {
853-
let s = "ศไทย中华Việt Nam";
854-
855-
let b = s.bytes();
856-
assert_eq!(b.count(), 28)
857-
}
858-
859-
#[test]
860-
fn test_bytesator_last() {
861-
let s = "ศไทย中华Việt Nam";
862-
863-
let b = s.bytes();
864-
assert_eq!(b.last().unwrap(), 109)
865-
}
866-
867836
#[test]
868837
fn test_char_indicesator() {
869838
let s = "ศไทย中华Việt Nam";

branches/beta/src/libcore/str/mod.rs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -411,21 +411,6 @@ impl<'a> Iterator for Bytes<'a> {
411411
fn size_hint(&self) -> (usize, Option<usize>) {
412412
self.0.size_hint()
413413
}
414-
415-
#[inline]
416-
fn count(self) -> usize {
417-
self.0.count()
418-
}
419-
420-
#[inline]
421-
fn last(self) -> Option<Self::Item> {
422-
self.0.last()
423-
}
424-
425-
#[inline]
426-
fn nth(&mut self, n: usize) -> Option<Self::Item> {
427-
self.0.nth(n)
428-
}
429414
}
430415

431416
#[stable(feature = "rust1", since = "1.0.0")]

branches/beta/src/liblibc/lib.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3614,7 +3614,6 @@ pub mod consts {
36143614
pub mod posix08 {
36153615
use types::os::arch::c95::c_int;
36163616
pub const O_CLOEXEC: c_int = 0x80000;
3617-
pub const F_DUPFD_CLOEXEC: c_int = 1030;
36183617
}
36193618
#[cfg(any(target_arch = "arm",
36203619
target_arch = "aarch64",
@@ -4286,13 +4285,11 @@ pub mod consts {
42864285
pub mod posix08 {
42874286
use types::os::arch::c95::c_int;
42884287
pub const O_CLOEXEC: c_int = 0x100000;
4289-
pub const F_DUPFD_CLOEXEC: c_int = 17;
42904288
}
42914289
#[cfg(target_os = "dragonfly")]
42924290
pub mod posix08 {
42934291
use types::os::arch::c95::c_int;
42944292
pub const O_CLOEXEC: c_int = 0x20000;
4295-
pub const F_DUPFD_CLOEXEC: c_int = 17;
42964293
}
42974294
pub mod bsd44 {
42984295
use types::os::arch::c95::c_int;
@@ -4660,6 +4657,7 @@ pub mod consts {
46604657
pub const F_GETLK : c_int = 7;
46614658
pub const F_SETLK : c_int = 8;
46624659
pub const F_SETLKW : c_int = 9;
4660+
pub const F_DUPFD_CLOEXEC : c_int = 10;
46634661

46644662
pub const SIGTRAP : c_int = 5;
46654663
pub const SIG_IGN: size_t = 1;
@@ -4741,13 +4739,11 @@ pub mod consts {
47414739
pub mod posix08 {
47424740
use types::os::arch::c95::c_int;
47434741
pub const O_CLOEXEC: c_int = 0x10000;
4744-
pub const F_DUPFD_CLOEXEC: c_int = 10;
47454742
}
47464743
#[cfg(target_os = "netbsd")]
47474744
pub mod posix08 {
47484745
use types::os::arch::c95::c_int;
47494746
pub const O_CLOEXEC: c_int = 0x400000;
4750-
pub const F_DUPFD_CLOEXEC: c_int = 12;
47514747
}
47524748
pub mod bsd44 {
47534749
use types::os::arch::c95::c_int;
@@ -5190,7 +5186,6 @@ pub mod consts {
51905186
pub mod posix08 {
51915187
use types::os::arch::c95::c_int;
51925188
pub const O_CLOEXEC: c_int = 0x1000000;
5193-
pub const F_DUPFD_CLOEXEC: c_int = 67;
51945189
}
51955190
pub mod bsd44 {
51965191
use types::os::arch::c95::c_int;

branches/beta/src/librustc_back/target/dragonfly_base.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ pub fn opts() -> TargetOptions {
2828
"-Wl,--as-needed".to_string(),
2929
),
3030
position_independent_executables: true,
31-
archive_format: "gnu".to_string(),
31+
archive_format: "bsd".to_string(),
3232
exe_allocation_crate: super::best_allocator(),
3333
.. Default::default()
3434
}

branches/beta/src/librustc_typeck/check/intrinsic.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -408,13 +408,6 @@ pub fn check_platform_intrinsic_type(ccx: &CrateCtxt,
408408
let mut structural_to_nomimal = HashMap::new();
409409

410410
let sig = tcx.no_late_bound_regions(i_ty.ty.fn_sig()).unwrap();
411-
if intr.inputs.len() != sig.inputs.len() {
412-
span_err!(tcx.sess, it.span, E0444,
413-
"platform-specific intrinsic has invalid number of \
414-
arguments: found {}, expected {}",
415-
intr.inputs.len(), sig.inputs.len());
416-
return
417-
}
418411
let input_pairs = intr.inputs.iter().zip(&sig.inputs);
419412
for (i, (expected_arg, arg)) in input_pairs.enumerate() {
420413
match_intrinsic_type_to_type(tcx, &format!("argument {}", i + 1), it.span,

branches/beta/src/librustc_typeck/diagnostics.rs

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3018,34 +3018,7 @@ PhantomData can also be used to express information about unused type
30183018
parameters. You can read more about it in the API documentation:
30193019
30203020
https://doc.rust-lang.org/std/marker/struct.PhantomData.html
3021-
"##,
3022-
3023-
E0444: r##"
3024-
A platform-specific intrinsic function has wrong number of arguments.
3025-
Erroneous code example:
3026-
3027-
```
3028-
#[repr(simd)]
3029-
struct f64x2(f64, f64);
3030-
3031-
extern "platform-intrinsic" {
3032-
fn x86_mm_movemask_pd(x: f64x2, y: f64x2, z: f64x2) -> i32;
3033-
// error: platform-specific intrinsic has invalid number of arguments
3034-
}
3035-
```
3036-
3037-
Please refer to the function declaration to see if it corresponds
3038-
with yours. Example:
3039-
3040-
```
3041-
#[repr(simd)]
3042-
struct f64x2(f64, f64);
3043-
3044-
extern "platform-intrinsic" {
3045-
fn x86_mm_movemask_pd(x: f64x2) -> i32; // ok!
3046-
}
3047-
```
3048-
"##,
3021+
"##
30493022

30503023
}
30513024

branches/beta/src/libstd/sys/unix/net.rs

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@ use prelude::v1::*;
1313
use ffi::CStr;
1414
use io;
1515
use libc::{self, c_int, size_t};
16-
use net::SocketAddr;
1716
use str;
18-
use sync::atomic::{self, AtomicBool};
1917
use sys::c;
18+
use net::SocketAddr;
2019
use sys::fd::FileDesc;
2120
use sys_common::{AsInner, FromInner, IntoInner};
2221
use sys_common::net::{getsockopt, setsockopt};
@@ -67,29 +66,10 @@ impl Socket {
6766
}
6867

6968
pub fn duplicate(&self) -> io::Result<Socket> {
70-
use libc::funcs::posix88::fcntl::fcntl;
71-
let make_socket = |fd| {
72-
let fd = FileDesc::new(fd);
73-
fd.set_cloexec();
74-
Socket(fd)
75-
};
76-
static EMULATE_F_DUPFD_CLOEXEC: AtomicBool = AtomicBool::new(false);
77-
if !EMULATE_F_DUPFD_CLOEXEC.load(atomic::Ordering::Relaxed) {
78-
match cvt(unsafe { fcntl(self.0.raw(), libc::F_DUPFD_CLOEXEC, 0) }) {
79-
// `EINVAL` can only be returned on two occasions: Invalid
80-
// command (second parameter) or invalid third parameter. 0 is
81-
// always a valid third parameter, so it must be the second
82-
// parameter.
83-
//
84-
// Store the result in a global variable so we don't try each
85-
// syscall twice.
86-
Err(ref e) if e.raw_os_error() == Some(libc::EINVAL) => {
87-
EMULATE_F_DUPFD_CLOEXEC.store(true, atomic::Ordering::Relaxed);
88-
}
89-
res => return res.map(make_socket),
90-
}
91-
}
92-
cvt(unsafe { fcntl(self.0.raw(), libc::F_DUPFD, 0) }).map(make_socket)
69+
let fd = try!(cvt(unsafe { libc::dup(self.0.raw()) }));
70+
let fd = FileDesc::new(fd);
71+
fd.set_cloexec();
72+
Ok(Socket(fd))
9373
}
9474

9575
pub fn read(&self, buf: &mut [u8]) -> io::Result<usize> {

branches/beta/src/libsyntax/codemap.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,6 @@ pub enum CompilerExpansionFormat {
275275
PlacementIn,
276276
WhileLet,
277277
ForLoop,
278-
Closure,
279278
}
280279

281280
impl CompilerExpansionFormat {
@@ -285,7 +284,6 @@ impl CompilerExpansionFormat {
285284
CompilerExpansionFormat::PlacementIn => "placement-in expansion",
286285
CompilerExpansionFormat::WhileLet => "while let expansion",
287286
CompilerExpansionFormat::ForLoop => "for loop expansion",
288-
CompilerExpansionFormat::Closure => "closure expansion",
289287
}
290288
}
291289
}

branches/beta/src/libsyntax/ext/expand.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -459,15 +459,12 @@ pub fn expand_expr(e: P<ast::Expr>, fld: &mut MacroExpander) -> P<ast::Expr> {
459459
}
460460

461461
ast::ExprClosure(capture_clause, fn_decl, block) => {
462-
push_compiler_expansion(fld, span, CompilerExpansionFormat::Closure);
463462
let (rewritten_fn_decl, rewritten_block)
464463
= expand_and_rename_fn_decl_and_block(fn_decl, block, fld);
465464
let new_node = ast::ExprClosure(capture_clause,
466465
rewritten_fn_decl,
467466
rewritten_block);
468-
let result = P(ast::Expr{id:id, node: new_node, span: fld.new_span(span)});
469-
fld.cx.bt_pop();
470-
result
467+
P(ast::Expr{id:id, node: new_node, span: fld.new_span(span)})
471468
}
472469

473470
_ => {

branches/beta/src/test/compile-fail/intrinsic-invalid-number-of-arguments.rs

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)