Skip to content

Commit 83f7016

Browse files
committed
---
yaml --- r: 191295 b: refs/heads/try c: 3dd455d h: refs/heads/master i: 191293: 0bd5932 191291: f569e10 191287: 39f08e9 191279: 728a783 191263: aedbd75 191231: 895b522 v: v3
1 parent e257b71 commit 83f7016

File tree

27 files changed

+191
-315
lines changed

27 files changed

+191
-315
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 809a554fca2d0ebc2ba50077016fe282a4064752
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: c64d671671aea2e44ee7fc6eb00ee75fc30ed7b9
5-
refs/heads/try: 95018eec69679681acdfae8608779c1e2674322d
5+
refs/heads/try: 3dd455d4e13680a10048814b3f80b2b3bdccbd31
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
88
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try/configure

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -823,11 +823,11 @@ then
823823
LLVM_VERSION=$($LLVM_CONFIG --version)
824824

825825
case $LLVM_VERSION in
826-
(3.[5-6]*)
826+
(3.[2-6]*)
827827
msg "found ok version of LLVM: $LLVM_VERSION"
828828
;;
829829
(*)
830-
err "bad LLVM version: $LLVM_VERSION, need >=3.5"
830+
err "bad LLVM version: $LLVM_VERSION, need >=3.0svn"
831831
;;
832832
esac
833833
fi

branches/try/mk/main.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,6 @@ LLVM_VERSION_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --version)
290290
LLVM_BINDIR_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --bindir)
291291
LLVM_INCDIR_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --includedir)
292292
LLVM_LIBDIR_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --libdir)
293-
LLVM_LIBDIR_RUSTFLAGS_$(1)=-L "$$(LLVM_LIBDIR_$(1))"
294293
LLVM_LIBS_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --libs $$(LLVM_COMPONENTS))
295294
LLVM_LDFLAGS_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --ldflags)
296295
# On FreeBSD, it may search wrong headers (that are for pre-installed LLVM),

branches/try/mk/target.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$(4): \
8484
$$(subst @,,$$(STAGE$(1)_T_$(2)_H_$(3))) \
8585
$$(RUST_LIB_FLAGS_ST$(1)) \
8686
-L "$$(RT_OUTPUT_DIR_$(2))" \
87-
$$(LLVM_LIBDIR_RUSTFLAGS_$(2)) \
87+
-L "$$(LLVM_LIBDIR_$(2))" \
8888
$$(LLVM_STDCPP_RUSTFLAGS_$(2)) \
8989
$$(RUSTFLAGS_$(4)) \
9090
--out-dir $$(@D) \

branches/try/mk/tests.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ $(3)/stage$(1)/test/$(4)test-$(2)$$(X_$(2)): \
372372
$(Q)CFG_LLVM_LINKAGE_FILE=$$(LLVM_LINKAGE_PATH_$(3)) \
373373
$$(subst @,,$$(STAGE$(1)_T_$(2)_H_$(3))) -o $$@ $$< --test \
374374
-L "$$(RT_OUTPUT_DIR_$(2))" \
375-
$$(LLVM_LIBDIR_RUSTFLAGS_$(2)) \
375+
-L "$$(LLVM_LIBDIR_$(2))" \
376376
$$(RUSTFLAGS_$(4))
377377

378378
endef

branches/try/src/doc/trpl/closures.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ is that a moving closure always takes ownership of all variables that
6868
it uses. Ordinary closures, in contrast, just create a reference into
6969
the enclosing stack frame. Moving closures are most useful with Rust's
7070
concurrency features, and so we'll just leave it at this for
71-
now. We'll talk about them more in the "Concurrency" chapter of the book.
71+
now. We'll talk about them more in the "Threads" section of the guide.
7272

7373
## Accepting closures as arguments
7474

branches/try/src/doc/trpl/concurrency.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ fn main() {
339339
});
340340
}
341341
342-
rx.recv().ok().expect("Could not receive answer");
342+
rx.recv().ok().expect("Could not recieve answer");
343343
}
344344
```
345345

branches/try/src/doc/trpl/method-syntax.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,13 +187,13 @@ impl CircleBuilder {
187187
}
188188
189189
fn coordinate(&mut self, coordinate: f64) -> &mut CircleBuilder {
190-
self.coordinate = coordinate;
191-
self
190+
self.coordinate = coordinate;
191+
self
192192
}
193193
194194
fn radius(&mut self, radius: f64) -> &mut CircleBuilder {
195-
self.radius = radius;
196-
self
195+
self.radius = radius;
196+
self
197197
}
198198
199199
fn finalize(&self) -> Circle {

branches/try/src/librustc/middle/check_match.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,6 @@ fn is_useful(cx: &MatchCheckCtxt,
646646
if rows[0].len() == 0 {
647647
return NotUseful;
648648
}
649-
assert!(rows.iter().all(|r| r.len() == v.len()));
650649
let real_pat = match rows.iter().find(|r| (*r)[0].id != DUMMY_NODE_ID) {
651650
Some(r) => raw_pat(r[0]),
652651
None if v.len() == 0 => return NotUseful,
@@ -655,12 +654,7 @@ fn is_useful(cx: &MatchCheckCtxt,
655654
let left_ty = if real_pat.id == DUMMY_NODE_ID {
656655
ty::mk_nil(cx.tcx)
657656
} else {
658-
let left_ty = ty::pat_ty(cx.tcx, &*real_pat);
659-
660-
match real_pat.node {
661-
ast::PatIdent(ast::BindByRef(..), _, _) => ty::deref(left_ty, false).unwrap().ty,
662-
_ => left_ty,
663-
}
657+
ty::pat_ty(cx.tcx, &*real_pat)
664658
};
665659

666660
let max_slice_length = rows.iter().filter_map(|row| match row[0].node {

branches/try/src/librustc/session/search_paths.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
use std::slice;
1212
use std::path::{Path, PathBuf};
13-
use session::early_error;
1413

1514
#[derive(Clone, Debug)]
1615
pub struct SearchPaths {
@@ -51,9 +50,6 @@ impl SearchPaths {
5150
} else {
5251
(PathKind::All, path)
5352
};
54-
if path.is_empty() {
55-
early_error("empty search path given via `-L`");
56-
}
5753
self.paths.push((kind, PathBuf::new(path)));
5854
}
5955

branches/try/src/librustc_lint/builtin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -811,7 +811,7 @@ impl NonCamelCaseTypes {
811811
if i == 0 {
812812
c.to_uppercase().collect::<String>()
813813
} else {
814-
c.to_lowercase().collect()
814+
c.to_string()
815815
}
816816
)).collect::<Vec<_>>().concat()
817817
}

branches/try/src/librustc_trans/trans/tvec.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ pub fn write_content<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
293293
}
294294
SaveIn(lldest) => {
295295
match ty::eval_repeat_count(bcx.tcx(), &**count_expr) {
296-
0 => expr::trans_into(bcx, &**element, Ignore),
296+
0 => bcx,
297297
1 => expr::trans_into(bcx, &**element, SaveIn(lldest)),
298298
count => {
299299
let elem = unpack_datum!(bcx, expr::trans(bcx, &**element));
@@ -410,12 +410,8 @@ pub fn iter_vec_loop<'blk, 'tcx, F>(bcx: Block<'blk, 'tcx>,
410410
F: FnOnce(Block<'blk, 'tcx>, ValueRef, Ty<'tcx>) -> Block<'blk, 'tcx>,
411411
{
412412
let _icx = push_ctxt("tvec::iter_vec_loop");
413-
414-
if bcx.unreachable.get() {
415-
return bcx;
416-
}
417-
418413
let fcx = bcx.fcx;
414+
419415
let loop_bcx = fcx.new_temp_block("expr_repeat");
420416
let next_bcx = fcx.new_temp_block("expr_repeat: next");
421417

branches/try/src/librustdoc/html/render.rs

Lines changed: 10 additions & 117 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
//! both occur before the crate is rendered.
3535
pub use self::ExternalLocation::*;
3636

37-
use std::ascii::OwnedAsciiExt;
3837
use std::cell::RefCell;
3938
use std::cmp::Ordering;
4039
use std::collections::{HashMap, HashSet};
@@ -240,51 +239,6 @@ struct IndexItem {
240239
path: String,
241240
desc: String,
242241
parent: Option<ast::DefId>,
243-
search_type: Option<IndexItemFunctionType>,
244-
}
245-
246-
/// A type used for the search index.
247-
struct Type {
248-
name: Option<String>,
249-
}
250-
251-
impl fmt::Display for Type {
252-
/// Formats type as {name: $name}.
253-
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
254-
// Wrapping struct fmt should never call us when self.name is None,
255-
// but just to be safe we write `null` in that case.
256-
match self.name {
257-
Some(ref n) => write!(f, "{{\"name\":\"{}\"}}", n),
258-
None => write!(f, "null")
259-
}
260-
}
261-
}
262-
263-
/// Full type of functions/methods in the search index.
264-
struct IndexItemFunctionType {
265-
inputs: Vec<Type>,
266-
output: Option<Type>
267-
}
268-
269-
impl fmt::Display for IndexItemFunctionType {
270-
/// Formats a full fn type as a JSON {inputs: [Type], outputs: Type/null}.
271-
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
272-
// If we couldn't figure out a type, just write `null`.
273-
if self.inputs.iter().any(|ref i| i.name.is_none()) ||
274-
(self.output.is_some() && self.output.as_ref().unwrap().name.is_none()) {
275-
return write!(f, "null")
276-
}
277-
278-
let inputs: Vec<String> = self.inputs.iter().map(|ref t| format!("{}", t)).collect();
279-
try!(write!(f, "{{\"inputs\":[{}],\"output\":", inputs.connect(",")));
280-
281-
match self.output {
282-
Some(ref t) => try!(write!(f, "{}", t)),
283-
None => try!(write!(f, "null"))
284-
};
285-
286-
Ok(try!(write!(f, "}}")))
287-
}
288242
}
289243

290244
// TLS keys used to carry information around during rendering.
@@ -453,9 +407,8 @@ fn build_index(krate: &clean::Crate, cache: &mut Cache) -> io::Result<String> {
453407
ty: shortty(item),
454408
name: item.name.clone().unwrap(),
455409
path: fqp[..fqp.len() - 1].connect("::"),
456-
desc: shorter(item.doc_value()),
410+
desc: shorter(item.doc_value()).to_string(),
457411
parent: Some(did),
458-
search_type: None,
459412
});
460413
},
461414
None => {}
@@ -505,11 +458,7 @@ fn build_index(krate: &clean::Crate, cache: &mut Cache) -> io::Result<String> {
505458
let pathid = *nodeid_to_pathid.get(&nodeid).unwrap();
506459
try!(write!(&mut w, ",{}", pathid));
507460
}
508-
None => try!(write!(&mut w, ",null"))
509-
}
510-
match item.search_type {
511-
Some(ref t) => try!(write!(&mut w, ",{}", t)),
512-
None => try!(write!(&mut w, ",null"))
461+
None => {}
513462
}
514463
try!(write!(&mut w, "]"));
515464
}
@@ -923,21 +872,12 @@ impl DocFolder for Cache {
923872

924873
match parent {
925874
(parent, Some(path)) if is_method || (!self.privmod && !hidden_field) => {
926-
// Needed to determine `self` type.
927-
let parent_basename = self.parent_stack.first().and_then(|parent| {
928-
match self.paths.get(parent) {
929-
Some(&(ref fqp, _)) => Some(fqp[fqp.len() - 1].clone()),
930-
_ => None
931-
}
932-
});
933-
934875
self.search_index.push(IndexItem {
935876
ty: shortty(&item),
936877
name: s.to_string(),
937878
path: path.connect("::").to_string(),
938-
desc: shorter(item.doc_value()),
879+
desc: shorter(item.doc_value()).to_string(),
939880
parent: parent,
940-
search_type: get_index_search_type(&item, parent_basename),
941881
});
942882
}
943883
(Some(parent), None) if is_method || (!self.privmod && !hidden_field)=> {
@@ -1527,14 +1467,13 @@ fn full_path(cx: &Context, item: &clean::Item) -> String {
15271467
return s
15281468
}
15291469

1530-
fn shorter<'a>(s: Option<&'a str>) -> String {
1470+
fn shorter<'a>(s: Option<&'a str>) -> &'a str {
15311471
match s {
1532-
Some(s) => s.lines().take_while(|line|{
1533-
(*line).chars().any(|chr|{
1534-
!chr.is_whitespace()
1535-
})
1536-
}).collect::<Vec<_>>().connect("\n"),
1537-
None => "".to_string()
1472+
Some(s) => match s.find("\n\n") {
1473+
Some(pos) => &s[..pos],
1474+
None => s,
1475+
},
1476+
None => ""
15381477
}
15391478
}
15401479

@@ -1664,7 +1603,7 @@ fn item_module(w: &mut fmt::Formatter, cx: &Context,
16641603
</tr>
16651604
",
16661605
*myitem.name.as_ref().unwrap(),
1667-
Markdown(&shorter(myitem.doc_value())[..]),
1606+
Markdown(shorter(myitem.doc_value())),
16681607
class = shortty(myitem),
16691608
href = item_path(myitem),
16701609
title = full_path(cx, myitem),
@@ -2368,52 +2307,6 @@ fn make_item_keywords(it: &clean::Item) -> String {
23682307
format!("{}, {}", get_basic_keywords(), it.name.as_ref().unwrap())
23692308
}
23702309

2371-
fn get_index_search_type(item: &clean::Item,
2372-
parent: Option<String>) -> Option<IndexItemFunctionType> {
2373-
let decl = match item.inner {
2374-
clean::FunctionItem(ref f) => &f.decl,
2375-
clean::MethodItem(ref m) => &m.decl,
2376-
clean::TyMethodItem(ref m) => &m.decl,
2377-
_ => return None
2378-
};
2379-
2380-
let mut inputs = Vec::new();
2381-
2382-
// Consider `self` an argument as well.
2383-
if let Some(name) = parent {
2384-
inputs.push(Type { name: Some(name.into_ascii_lowercase()) });
2385-
}
2386-
2387-
inputs.extend(&mut decl.inputs.values.iter().map(|arg| {
2388-
get_index_type(&arg.type_)
2389-
}));
2390-
2391-
let output = match decl.output {
2392-
clean::FunctionRetTy::Return(ref return_type) => Some(get_index_type(return_type)),
2393-
_ => None
2394-
};
2395-
2396-
Some(IndexItemFunctionType { inputs: inputs, output: output })
2397-
}
2398-
2399-
fn get_index_type(clean_type: &clean::Type) -> Type {
2400-
Type { name: get_index_type_name(clean_type).map(|s| s.into_ascii_lowercase()) }
2401-
}
2402-
2403-
fn get_index_type_name(clean_type: &clean::Type) -> Option<String> {
2404-
match *clean_type {
2405-
clean::ResolvedPath { ref path, .. } => {
2406-
let segments = &path.segments;
2407-
Some(segments[segments.len() - 1].name.clone())
2408-
},
2409-
clean::Generic(ref s) => Some(s.clone()),
2410-
clean::Primitive(ref p) => Some(format!("{:?}", p)),
2411-
clean::BorrowedRef { ref type_, .. } => get_index_type_name(type_),
2412-
// FIXME: add all from clean::Type.
2413-
_ => None
2414-
}
2415-
}
2416-
24172310
pub fn cache() -> Arc<Cache> {
24182311
CACHE_KEY.with(|c| c.borrow().clone())
24192312
}

0 commit comments

Comments
 (0)