Skip to content

Commit 083fe49

Browse files
committed
---
yaml --- r: 95034 b: refs/heads/dist-snap c: 2835df2 h: refs/heads/master v: v3
1 parent 318f101 commit 083fe49

File tree

157 files changed

+1839
-1766
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

157 files changed

+1839
-1766
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: c274a6888410ce3e357e014568b43310ed787d36
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: 9cc11ca6a31e05c75cd40097b38d6f735254e12c
9+
refs/heads/dist-snap: 2835df2db65b1c03f3f21f553b8f31db0fb1b6c0
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/Makefile.in

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,11 @@ endif
141141

142142
# version-string calculation
143143
CFG_GIT_DIR := $(CFG_SRC_DIR).git
144-
CFG_RELEASE = 0.9-pre
144+
CFG_RELEASE = 0.8
145145
CFG_VERSION = $(CFG_RELEASE)
146146
# windows exe's need numeric versions - don't use anything but
147147
# numbers and dots here
148-
CFG_VERSION_WIN = 0.9
148+
CFG_VERSION_WIN = 0.8
149149

150150
ifneq ($(wildcard $(CFG_GIT)),)
151151
ifneq ($(wildcard $(CFG_GIT_DIR)),)
@@ -608,6 +608,10 @@ config.stamp: $(S)configure $(S)Makefile.in $(S)src/snapshots.txt
608608
# Primary-target makefiles
609609
######################################################################
610610

611+
# Issue #9531: If you change the order of any of the following (or add
612+
# new definitions), make sure definitions always precede their uses,
613+
# especially for the dependency lists of recipes.
614+
611615
include $(CFG_SRC_DIR)mk/target.mk
612616
include $(CFG_SRC_DIR)mk/host.mk
613617
include $(CFG_SRC_DIR)mk/stage0.mk

branches/dist-snap/doc/tutorial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,7 @@ fn area(sh: Shape) -> float {
737737
match sh {
738738
Circle { radius: radius, _ } => float::consts::pi * square(radius),
739739
Rectangle { top_left: top_left, bottom_right: bottom_right } => {
740-
(bottom_right.x - top_left.x) * (top_left.y - bottom_right.y)
740+
(bottom_right.x - top_left.x) * (bottom_right.y - top_left.y)
741741
}
742742
}
743743
}

branches/dist-snap/mk/clean.mk

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,9 @@ clean-misc:
5454
$(Q)rm -Rf rust-stage0-*.tar.bz2 $(PKG_NAME)-*.tar.gz dist
5555
$(Q)rm -Rf $(foreach ext, \
5656
html aux cp fn ky log pdf pg toc tp vr cps, \
57-
$(wildcard doc/*.$(ext)))
58-
$(Q)find doc/std doc/extra -mindepth 1 | xargs rm -Rf
57+
$(wildcard doc/*.$(ext) \
58+
doc/*/*.$(ext) \
59+
doc/*/*/*.$(ext)))
5960
$(Q)rm -Rf doc/version.md
6061
$(Q)rm -Rf $(foreach sub, index styles files search javascript, \
6162
$(wildcard doc/*/$(sub)))

branches/dist-snap/mk/docs.mk

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,10 @@ endif
217217
# Rustdoc (libstd/extra)
218218
######################################################################
219219

220+
ifeq ($(CFG_PANDOC),)
221+
$(info cfg: no pandoc found, omitting library doc build)
222+
else
223+
220224
# The rustdoc executable
221225
RUSTDOC = $(HBIN2_H_$(CFG_BUILD_TRIPLE))/rustdoc$(X_$(CFG_BUILD_TRIPLE))
222226

@@ -234,6 +238,7 @@ endef
234238

235239
$(eval $(call libdoc,std,$(STDLIB_CRATE),$(CFG_BUILD_TRIPLE)))
236240
$(eval $(call libdoc,extra,$(EXTRALIB_CRATE),$(CFG_BUILD_TRIPLE)))
241+
endif
237242

238243

239244
ifdef CFG_DISABLE_DOCS

branches/dist-snap/mk/stage0.mk

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ $(HBIN0_H_$(CFG_BUILD_TRIPLE))/:
66
$(HLIB0_H_$(CFG_BUILD_TRIPLE))/:
77
mkdir -p $@
88

9-
SNAPSHOT_RUSTC_POST_CLEANUP=$(HBIN0_H_$(CFG_BUILD_TRIPLE))/rustc$(X_$(CFG_BUILD_TRIPLE))
10-
119
$(SNAPSHOT_RUSTC_POST_CLEANUP): \
1210
$(S)src/snapshots.txt \
1311
$(S)src/etc/get-snapshot.py $(MKFILE_DEPS) \

branches/dist-snap/mk/target.mk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ WFLAGS_ST2 = -D warnings
3636
# had its chance to clean it out; otherwise the other products will be
3737
# inadvertantly included in the clean out.
3838

39+
SNAPSHOT_RUSTC_POST_CLEANUP=$(HBIN0_H_$(CFG_BUILD_TRIPLE))/rustc$(X_$(CFG_BUILD_TRIPLE))
40+
3941
define TARGET_STAGE_N
4042

4143
$$(TLIB$(1)_T_$(2)_H_$(3))/libmorestack.a: \

branches/dist-snap/src/etc/emacs/rust-mode.el

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@
127127
(defconst rust-mode-keywords
128128
'("as"
129129
"break"
130-
"continue"
131130
"do"
132131
"else" "enum" "extern"
133132
"false" "fn" "for"

branches/dist-snap/src/etc/gedit/share/gtksourceview-3.0/language-specs/rust.lang

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
<keyword>assert</keyword>
4040
<keyword>break</keyword>
4141
<keyword>const</keyword>
42-
<keyword>continue</keyword>
4342
<keyword>do</keyword>
4443
<keyword>drop</keyword>
4544
<keyword>else</keyword>

branches/dist-snap/src/etc/kate/rust.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<!ENTITY rustIdent "[a-zA-Z_][a-zA-Z_0-9]*">
88
<!ENTITY rustIntSuf "([iu](8|16|32|64)?)?">
99
]>
10-
<language name="Rust" version="0.9-pre" kateversion="2.4" section="Sources" extensions="*.rs;*.rc" mimetype="text/x-rust" priority="15">
10+
<language name="Rust" version="0.8" kateversion="2.4" section="Sources" extensions="*.rs;*.rc" mimetype="text/x-rust" priority="15">
1111
<highlighting>
1212
<list name="fn">
1313
<item> fn </item>
@@ -18,7 +18,6 @@
1818
<list name="keywords">
1919
<item> as </item>
2020
<item> break </item>
21-
<item> continue </item>
2221
<item> do </item>
2322
<item> drop </item>
2423
<item> else </item>
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
#!/usr/bin/perl
2+
3+
#
4+
# This is a tool that helps with debugging incorrect monomorphic instance collapse.
5+
#
6+
# To use:
7+
# $ RUST_LOG=rustc::middle::trans::monomorphize rustc ARGS 2>&1 >log.txt
8+
# $ ./monodebug.pl log.txt
9+
#
10+
# This will show all generics that got collapsed. You can inspect this list to find the instances
11+
# that were mistakenly combined into one. Fixes will (most likely) be applied to type_use.rs.
12+
#
13+
# Questions about this tool go to pcwalton.
14+
#
15+
16+
use strict;
17+
use warnings;
18+
use Data::Dumper qw(Dumper);
19+
use Text::Balanced qw(extract_bracketed);
20+
21+
my %funcs;
22+
while (<>) {
23+
chomp;
24+
/^rust: ~"monomorphic_fn\((.*)"$/ or next;
25+
my $text = $1;
26+
$text =~ /fn_id=(\{ crate: \d+, node: \d+ \} \([^)]+\)), real_substs=(.*?), substs=(.*?), hash_id = \@\{ (.*) \}$/ or next;
27+
my ($fn_id, $real_substs, $substs, $hash_id) = ($1, $2, $3, $4);
28+
29+
#print "$hash_id\n";
30+
$hash_id =~ /^def: { crate: \d+, node: \d+ }, params: ~\[ (.*) \], impl_did_opt: (?:None|Some\({ crate: \d+, node: \d+ }\))$/ or next;
31+
my $params = $1;
32+
33+
my @real_substs;
34+
@real_substs = $real_substs =~ /\\"(.*?)\\"/g;
35+
36+
my @mono_params;
37+
while (1) {
38+
$params =~ s/^, //;
39+
if ($params =~ s/^mono_precise//) {
40+
extract_bracketed($params, '()');
41+
push @mono_params, 'precise';
42+
next;
43+
}
44+
if ($params =~ s/^mono_repr//) {
45+
my $sub = extract_bracketed($params, '()');
46+
push @mono_params, "repr($sub)";
47+
next;
48+
}
49+
if ($params =~ s/^mono_any//) {
50+
push @mono_params, "any";
51+
next;
52+
}
53+
last;
54+
}
55+
56+
my @key_params;
57+
for (my $i = 0; $i < @mono_params; ++$i) {
58+
if ($mono_params[$i] eq 'precise') {
59+
push @key_params, 'precise(' . $real_substs[$i] . ')';
60+
} else {
61+
push @key_params, $mono_params[$i];
62+
}
63+
}
64+
65+
my $key = "$fn_id with " . (join ', ', @key_params);
66+
$funcs{$key}{$real_substs} = 1;
67+
}
68+
69+
while (my ($key, $substs) = each %funcs) {
70+
my @params = keys %$substs;
71+
next if @params == 1;
72+
73+
print "$key\n";
74+
print(('-' x (length $key)), $/);
75+
for my $param (@params) {
76+
print "$param\n";
77+
}
78+
print "\n";
79+
}

branches/dist-snap/src/etc/vim/syntax/rust.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ syn keyword rustOperator as
1818

1919
syn match rustAssert "\<assert\(\w\)*!" contained
2020
syn match rustFail "\<fail\(\w\)*!" contained
21-
syn keyword rustKeyword break continue do extern
21+
syn keyword rustKeyword break do extern
2222
syn keyword rustKeyword in if impl let log
2323
syn keyword rustKeyword for impl let log
2424
syn keyword rustKeyword loop mod once priv pub

branches/dist-snap/src/etc/zsh/_rust

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ _rustc_opts_debug=(
7171
'count-type-sizes:count the sizes of aggregate types'
7272
'meta-stats:gather metadata statistics'
7373
'no-opt:do not optimize, even if -O is passed'
74+
'no-monomorphic-collapse:do not collapse template instantiations'
7475
'print-link-args:Print the arguments passed to the linker'
7576
'gc:Garbage collect shared data (experimental)'
7677
'jit:Execute using JIT (experimental)'

branches/dist-snap/src/libextra/base64.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@ use std::str;
1313

1414
/// Available encoding character sets
1515
pub enum CharacterSet {
16-
/// The standard character set (uses `+` and `/`)
16+
/// The standard character set (uses '+' and '/')
1717
Standard,
18-
/// The URL safe character set (uses `-` and `_`)
18+
/// The URL safe character set (uses '-' and '_')
1919
UrlSafe
2020
}
2121

22-
/// Contains configuration parameters for `to_base64`.
22+
/// Contains configuration parameters for to_base64
2323
pub struct Config {
2424
/// Character set to use
2525
char_set: CharacterSet,
26-
/// True to pad output with `=` characters
26+
/// True to pad output with '=' characters
2727
pad: bool,
28-
/// `Some(len)` to wrap lines at `len`, `None` to disable line wrapping
28+
/// Some(len) to wrap lines at len, None to disable line wrapping
2929
line_length: Option<uint>
3030
}
3131

@@ -68,7 +68,7 @@ impl<'self> ToBase64 for &'self [u8] {
6868
*
6969
* fn main () {
7070
* let str = [52,32].to_base64(standard);
71-
* println!("{}", str);
71+
* printfln!("%s", str);
7272
* }
7373
* ```
7474
*/
@@ -177,11 +177,11 @@ impl<'self> FromBase64 for &'self str {
177177
*
178178
* fn main () {
179179
* let hello_str = "Hello, World".to_base64(standard);
180-
* println!("{}", hello_str);
180+
* printfln!("%s", hello_str);
181181
* let bytes = hello_str.from_base64();
182-
* println!("{:?}", bytes);
182+
* printfln!("%?", bytes);
183183
* let result_str = str::from_utf8(bytes);
184-
* println!("{}", result_str);
184+
* printfln!("%s", result_str);
185185
* }
186186
* ```
187187
*/

0 commit comments

Comments
 (0)