about summary refs log tree commit diff
path: root/src/etc
diff options
context:
space:
mode:
Diffstat (limited to 'src/etc')
-rwxr-xr-xsrc/etc/cat-and-grep.sh10
-rw-r--r--src/etc/debugger_pretty_printers_common.py16
-rw-r--r--src/etc/dec2flt_table.py20
-rw-r--r--src/etc/gdb_load_rust_pretty_printers.py10
-rwxr-xr-xsrc/etc/gdb_rust_pretty_printing.py14
-rwxr-xr-xsrc/etc/generate-deriving-span-tests.py21
-rwxr-xr-xsrc/etc/generate-keyword-tests.py24
-rw-r--r--src/etc/htmldocck.py54
-rw-r--r--src/etc/lldb_batchmode.py10
-rw-r--r--src/etc/lldb_rust_formatters.py10
-rw-r--r--src/etc/platform-intrinsics/generator.py20
-rwxr-xr-xsrc/etc/rust-gdb10
-rwxr-xr-xsrc/etc/rust-gdbgui9
-rwxr-xr-xsrc/etc/rust-lldb9
-rw-r--r--src/etc/rust-windbg.cmd10
-rw-r--r--src/etc/test-float-parse/_common.rs10
-rw-r--r--src/etc/test-float-parse/few-ones.rs10
-rw-r--r--src/etc/test-float-parse/huge-pow10.rs10
-rw-r--r--src/etc/test-float-parse/long-fractions.rs10
-rw-r--r--src/etc/test-float-parse/many-digits.rs10
-rw-r--r--src/etc/test-float-parse/rand-f64.rs10
-rw-r--r--src/etc/test-float-parse/runtests.py10
-rw-r--r--src/etc/test-float-parse/short-decimals.rs10
-rw-r--r--src/etc/test-float-parse/subnorm.rs10
-rw-r--r--src/etc/test-float-parse/tiny-pow10.rs10
-rw-r--r--src/etc/test-float-parse/u32-small.rs10
-rw-r--r--src/etc/test-float-parse/u64-pow2.rs10
-rw-r--r--src/etc/wasm32-shim.js10
28 files changed, 33 insertions, 344 deletions
diff --git a/src/etc/cat-and-grep.sh b/src/etc/cat-and-grep.sh
index 361e8d8e60e..77dc52a9350 100755
--- a/src/etc/cat-and-grep.sh
+++ b/src/etc/cat-and-grep.sh
@@ -1,16 +1,6 @@
 #!/bin/sh
 set -eu
 
-# Copyright 2017 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.
-
 # Performs `cat` and `grep` simultaneously for `run-make` tests in the Rust CI.
 #
 # This program will read lines from stdin and print them to stdout immediately.
diff --git a/src/etc/debugger_pretty_printers_common.py b/src/etc/debugger_pretty_printers_common.py
index b99e401929e..385ce8efab8 100644
--- a/src/etc/debugger_pretty_printers_common.py
+++ b/src/etc/debugger_pretty_printers_common.py
@@ -1,13 +1,3 @@
-# Copyright 2015 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.
-
 """
 This module provides an abstraction layer over common Rust pretty printing
 functionality needed by both GDB and LLDB.
@@ -352,8 +342,7 @@ def extract_length_ptr_and_cap_from_std_vec(vec_val):
 
     vec_ptr_val = buf.get_child_at_index(0)
     capacity = buf.get_child_at_index(1).as_integer()
-    unique_ptr_val = vec_ptr_val.get_child_at_index(0)
-    data_ptr = unique_ptr_val.get_child_at_index(0)
+    data_ptr = vec_ptr_val.get_child_at_index(0)
     assert data_ptr.type.get_dwarf_type_kind() == DWARF_TYPE_CODE_PTR
     return (length, data_ptr, capacity)
 
@@ -370,8 +359,7 @@ def extract_tail_head_ptr_and_cap_from_std_vecdeque(vec_val):
 
     vec_ptr_val = buf.get_child_at_index(0)
     capacity = buf.get_child_at_index(1).as_integer()
-    unique_ptr_val = vec_ptr_val.get_child_at_index(0)
-    data_ptr = unique_ptr_val.get_child_at_index(0)
+    data_ptr = vec_ptr_val.get_child_at_index(0)
     assert data_ptr.type.get_dwarf_type_kind() == DWARF_TYPE_CODE_PTR
     return (tail, head, data_ptr, capacity)
 
diff --git a/src/etc/dec2flt_table.py b/src/etc/dec2flt_table.py
index 9fdab1fcfca..2ffaf13dc8f 100644
--- a/src/etc/dec2flt_table.py
+++ b/src/etc/dec2flt_table.py
@@ -1,14 +1,4 @@
 #!/usr/bin/env python2.7
-#
-# Copyright 2015 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.
 
 """
 Generate powers of ten using William Clinger's ``AlgorithmM`` for use in
@@ -93,16 +83,6 @@ def error(f, e, z):
     return float(ulp_err)
 
 HEADER = """
-// Copyright 2015 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.
-
 //! Tables of approximations of powers of ten.
 //! DO NOT MODIFY: Generated by `src/etc/dec2flt_table.py`
 """
diff --git a/src/etc/gdb_load_rust_pretty_printers.py b/src/etc/gdb_load_rust_pretty_printers.py
index 755cac153d1..c551346bb00 100644
--- a/src/etc/gdb_load_rust_pretty_printers.py
+++ b/src/etc/gdb_load_rust_pretty_printers.py
@@ -1,12 +1,2 @@
-# Copyright 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.
-
 import gdb_rust_pretty_printing
 gdb_rust_pretty_printing.register_printers(gdb.current_objfile())
diff --git a/src/etc/gdb_rust_pretty_printing.py b/src/etc/gdb_rust_pretty_printing.py
index f02c7d87590..08ae289d603 100755
--- a/src/etc/gdb_rust_pretty_printing.py
+++ b/src/etc/gdb_rust_pretty_printing.py
@@ -1,13 +1,3 @@
-# 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.
-
 import gdb
 import re
 import sys
@@ -332,9 +322,7 @@ class RustStdVecDequePrinter(object):
 
 # Yield each key (and optionally value) from a BoxedNode.
 def children_of_node(boxed_node, height, want_values):
-    ptr = boxed_node['ptr']['pointer']
-    # This is written oddly because we don't want to rely on the field name being `__0`.
-    node_ptr = ptr[ptr.type.fields()[0]]
+    node_ptr = boxed_node['ptr']['pointer']
     if height > 0:
         type_name = str(node_ptr.type.target()).replace('LeafNode', 'InternalNode')
         node_type = gdb.lookup_type(type_name)
diff --git a/src/etc/generate-deriving-span-tests.py b/src/etc/generate-deriving-span-tests.py
index 31a438958e9..3d35ae07fbd 100755
--- a/src/etc/generate-deriving-span-tests.py
+++ b/src/etc/generate-deriving-span-tests.py
@@ -1,14 +1,4 @@
 #!/usr/bin/env python
-#
-# Copyright 2013 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.
 
 """
 This script creates a pile of compile-fail tests check that all the
@@ -25,16 +15,7 @@ TEST_DIR = os.path.abspath(
 
 YEAR = datetime.datetime.now().year
 
-TEMPLATE = """// Copyright {year} 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.
-
+TEMPLATE = """
 // This file was auto-generated using 'src/etc/generate-deriving-span-tests.py'
 
 {error_deriving}
diff --git a/src/etc/generate-keyword-tests.py b/src/etc/generate-keyword-tests.py
index 1d79f95a4d2..9936ce71b76 100755
--- a/src/etc/generate-keyword-tests.py
+++ b/src/etc/generate-keyword-tests.py
@@ -1,14 +1,5 @@
 #!/usr/bin/env python
-#
-# Copyright 2013 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.
+
 """
 This script takes a list of keywords and generates a testcase, that checks
 if using the keyword as identifier fails, for every keyword. The generate
@@ -24,18 +15,7 @@ import datetime
 import stat
 
 
-template = """// Copyright %d 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.
-
-// compile-flags: -Z parse-only
-
+template = """
 // This file was auto-generated using 'src/etc/generate-keyword-tests.py %s'
 
 fn main() {
diff --git a/src/etc/htmldocck.py b/src/etc/htmldocck.py
index 91010262981..e8be2b9b537 100644
--- a/src/etc/htmldocck.py
+++ b/src/etc/htmldocck.py
@@ -1,12 +1,5 @@
-# Copyright 2015 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.
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
 
 r"""
 htmldocck.py is a custom checker script for Rustdoc HTML outputs.
@@ -108,7 +101,10 @@ checks if the given file does not exist, for example.
 
 """
 
-from __future__ import print_function
+from __future__ import absolute_import, print_function, unicode_literals
+
+import codecs
+import io
 import sys
 import os.path
 import re
@@ -120,14 +116,10 @@ except ImportError:
     from HTMLParser import HTMLParser
 from xml.etree import cElementTree as ET
 
-# &larrb;/&rarrb; are not in HTML 4 but are in HTML 5
 try:
-    from html.entities import entitydefs
+    from html.entities import name2codepoint
 except ImportError:
-    from htmlentitydefs import entitydefs
-entitydefs['larrb'] = u'\u21e4'
-entitydefs['rarrb'] = u'\u21e5'
-entitydefs['nbsp'] = ' '
+    from htmlentitydefs import name2codepoint
 
 # "void elements" (no closing tag) from the HTML Standard section 12.1.2
 VOID_ELEMENTS = set(['area', 'base', 'br', 'col', 'embed', 'hr', 'img', 'input', 'keygen',
@@ -167,11 +159,11 @@ class CustomHTMLParser(HTMLParser):
         self.__builder.data(data)
 
     def handle_entityref(self, name):
-        self.__builder.data(entitydefs[name])
+        self.__builder.data(unichr(name2codepoint[name]))
 
     def handle_charref(self, name):
         code = int(name[1:], 16) if name.startswith(('x', 'X')) else int(name, 10)
-        self.__builder.data(unichr(code).encode('utf-8'))
+        self.__builder.data(unichr(code))
 
     def close(self):
         HTMLParser.close(self)
@@ -220,11 +212,11 @@ LINE_PATTERN = re.compile(r'''
     (?<=(?<!\S)@)(?P<negated>!?)
     (?P<cmd>[A-Za-z]+(?:-[A-Za-z]+)*)
     (?P<args>.*)$
-''', re.X)
+''', re.X | re.UNICODE)
 
 
 def get_commands(template):
-    with open(template, 'rU') as f:
+    with io.open(template, encoding='utf-8') as f:
         for lineno, line in concat_multi_lines(f):
             m = LINE_PATTERN.search(line)
             if not m:
@@ -236,7 +228,10 @@ def get_commands(template):
             if args and not args[:1].isspace():
                 print_err(lineno, line, 'Invalid template syntax')
                 continue
-            args = shlex.split(args)
+            try:
+                args = shlex.split(args)
+            except UnicodeEncodeError:
+                args = [arg.decode('utf-8') for arg in shlex.split(args.encode('utf-8'))]
             yield Command(negated=negated, cmd=cmd, args=args, lineno=lineno+1, context=line)
 
 
@@ -290,7 +285,7 @@ class CachedFiles(object):
         if not(os.path.exists(abspath) and os.path.isfile(abspath)):
             raise FailedCheck('File does not exist {!r}'.format(path))
 
-        with open(abspath) as f:
+        with io.open(abspath, encoding='utf-8') as f:
             data = f.read()
             self.files[path] = data
             return data
@@ -304,9 +299,9 @@ class CachedFiles(object):
         if not(os.path.exists(abspath) and os.path.isfile(abspath)):
             raise FailedCheck('File does not exist {!r}'.format(path))
 
-        with open(abspath) as f:
+        with io.open(abspath, encoding='utf-8') as f:
             try:
-                tree = ET.parse(f, CustomHTMLParser())
+                tree = ET.fromstringlist(f.readlines(), CustomHTMLParser())
             except Exception as e:
                 raise RuntimeError('Cannot parse an HTML file {!r}: {}'.format(path, e))
             self.trees[path] = tree
@@ -323,7 +318,7 @@ def check_string(data, pat, regexp):
     if not pat:
         return True # special case a presence testing
     elif regexp:
-        return re.search(pat, data) is not None
+        return re.search(pat, data, flags=re.UNICODE) is not None
     else:
         data = ' '.join(data.split())
         pat = ' '.join(pat.split())
@@ -360,7 +355,7 @@ def check_tree_text(tree, path, pat, regexp):
                     break
     except Exception as e:
         print('Failed to get path "{}"'.format(path))
-        raise e
+        raise
     return ret
 
 
@@ -369,7 +364,12 @@ def get_tree_count(tree, path):
     return len(tree.findall(path))
 
 def stderr(*args):
-    print(*args, file=sys.stderr)
+    if sys.version_info.major < 3:
+        file = codecs.getwriter('utf-8')(sys.stderr)
+    else:
+        file = sys.stderr
+
+    print(*args, file=file)
 
 def print_err(lineno, context, err, message=None):
     global ERR_COUNT
diff --git a/src/etc/lldb_batchmode.py b/src/etc/lldb_batchmode.py
index b0220c84ef2..6b4c4480674 100644
--- a/src/etc/lldb_batchmode.py
+++ b/src/etc/lldb_batchmode.py
@@ -1,13 +1,3 @@
-# Copyright 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.
-
 # This script allows to use LLDB in a way similar to GDB's batch mode. That is, given a text file
 # containing LLDB commands (one command per line), this script will execute the commands one after
 # the other.
diff --git a/src/etc/lldb_rust_formatters.py b/src/etc/lldb_rust_formatters.py
index 2bbd4372721..2c651c90f82 100644
--- a/src/etc/lldb_rust_formatters.py
+++ b/src/etc/lldb_rust_formatters.py
@@ -1,13 +1,3 @@
-# Copyright 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.
-
 import lldb
 import re
 import debugger_pretty_printers_common as rustpp
diff --git a/src/etc/platform-intrinsics/generator.py b/src/etc/platform-intrinsics/generator.py
index 046ea48638b..fa97131f695 100644
--- a/src/etc/platform-intrinsics/generator.py
+++ b/src/etc/platform-intrinsics/generator.py
@@ -1,13 +1,3 @@
-# Copyright 2015 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.
-
 from __future__ import division, print_function
 import json
 import argparse
@@ -788,16 +778,6 @@ class CompilerDefs(object):
     @staticmethod
     def open(platform):
         return '''\
-// Copyright 2015 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.
-
 // DO NOT EDIT: autogenerated by etc/platform-intrinsics/generator.py
 // ignore-tidy-linelength
 
diff --git a/src/etc/rust-gdb b/src/etc/rust-gdb
index 743952a5bef..23ba93da8e5 100755
--- a/src/etc/rust-gdb
+++ b/src/etc/rust-gdb
@@ -1,14 +1,4 @@
 #!/bin/sh
-# Copyright 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.
-
 # Exit if anything fails
 set -e
 
diff --git a/src/etc/rust-gdbgui b/src/etc/rust-gdbgui
index 7e179ba927d..08d598cde1c 100755
--- a/src/etc/rust-gdbgui
+++ b/src/etc/rust-gdbgui
@@ -1,13 +1,4 @@
 #!/bin/sh
-# Copyright 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.
 
 # Exit if anything fails
 set -e
diff --git a/src/etc/rust-lldb b/src/etc/rust-lldb
index 6ed8210349e..424302d495f 100755
--- a/src/etc/rust-lldb
+++ b/src/etc/rust-lldb
@@ -1,13 +1,4 @@
 #!/bin/sh
-# Copyright 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.
 
 # Exit if anything fails
 set -e
diff --git a/src/etc/rust-windbg.cmd b/src/etc/rust-windbg.cmd
index 8da4efb5803..2deb2a03a39 100644
--- a/src/etc/rust-windbg.cmd
+++ b/src/etc/rust-windbg.cmd
@@ -1,16 +1,6 @@
 @echo off
 setlocal
 
-REM Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-REM file at the top-level directory of this distribution and at
-REM http://rust-lang.org/COPYRIGHT.
-REM
-REM Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-REM http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-REM <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-REM option. This file may not be copied, modified, or distributed
-REM except according to those terms.
-
 for /f "delims=" %%i in ('rustc --print=sysroot') do set rustc_sysroot=%%i
 
 set rust_etc=%rustc_sysroot%\lib\rustlib\etc
diff --git a/src/etc/test-float-parse/_common.rs b/src/etc/test-float-parse/_common.rs
index 725a715f7cf..9cbad5486b4 100644
--- a/src/etc/test-float-parse/_common.rs
+++ b/src/etc/test-float-parse/_common.rs
@@ -1,13 +1,3 @@
-// Copyright 2015 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::io;
 use std::io::prelude::*;
 use std::mem::transmute;
diff --git a/src/etc/test-float-parse/few-ones.rs b/src/etc/test-float-parse/few-ones.rs
index 2486df44466..2d82918aabb 100644
--- a/src/etc/test-float-parse/few-ones.rs
+++ b/src/etc/test-float-parse/few-ones.rs
@@ -1,13 +1,3 @@
-// Copyright 2015 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.
-
 mod _common;
 
 use _common::validate;
diff --git a/src/etc/test-float-parse/huge-pow10.rs b/src/etc/test-float-parse/huge-pow10.rs
index 9d12a03dae2..9a16d9c6028 100644
--- a/src/etc/test-float-parse/huge-pow10.rs
+++ b/src/etc/test-float-parse/huge-pow10.rs
@@ -1,13 +1,3 @@
-// Copyright 2015 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.
-
 mod _common;
 
 use _common::validate;
diff --git a/src/etc/test-float-parse/long-fractions.rs b/src/etc/test-float-parse/long-fractions.rs
index 9598bd12a0d..55e4f07cd0c 100644
--- a/src/etc/test-float-parse/long-fractions.rs
+++ b/src/etc/test-float-parse/long-fractions.rs
@@ -1,13 +1,3 @@
-// Copyright 2016 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.
-
 mod _common;
 
 use std::char;
diff --git a/src/etc/test-float-parse/many-digits.rs b/src/etc/test-float-parse/many-digits.rs
index 469a38da2b8..76da818c709 100644
--- a/src/etc/test-float-parse/many-digits.rs
+++ b/src/etc/test-float-parse/many-digits.rs
@@ -1,13 +1,3 @@
-// Copyright 2015 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.
-
 extern crate rand;
 
 mod _common;
diff --git a/src/etc/test-float-parse/rand-f64.rs b/src/etc/test-float-parse/rand-f64.rs
index 2994dd9d5e6..39ad63945cd 100644
--- a/src/etc/test-float-parse/rand-f64.rs
+++ b/src/etc/test-float-parse/rand-f64.rs
@@ -1,13 +1,3 @@
-// Copyright 2015 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.
-
 extern crate rand;
 
 mod _common;
diff --git a/src/etc/test-float-parse/runtests.py b/src/etc/test-float-parse/runtests.py
index e9f5bba2312..852bc775896 100644
--- a/src/etc/test-float-parse/runtests.py
+++ b/src/etc/test-float-parse/runtests.py
@@ -1,14 +1,4 @@
 #!/usr/bin/env python2.7
-#
-# Copyright 2015 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.
 
 """
 Testing dec2flt
diff --git a/src/etc/test-float-parse/short-decimals.rs b/src/etc/test-float-parse/short-decimals.rs
index 4909f7c58f8..8b9b6f78ae3 100644
--- a/src/etc/test-float-parse/short-decimals.rs
+++ b/src/etc/test-float-parse/short-decimals.rs
@@ -1,13 +1,3 @@
-// Copyright 2015 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.
-
 mod _common;
 
 use _common::validate;
diff --git a/src/etc/test-float-parse/subnorm.rs b/src/etc/test-float-parse/subnorm.rs
index 04a7cc27466..448482c6eb8 100644
--- a/src/etc/test-float-parse/subnorm.rs
+++ b/src/etc/test-float-parse/subnorm.rs
@@ -1,13 +1,3 @@
-// Copyright 2015 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.
-
 mod _common;
 
 use std::mem::transmute;
diff --git a/src/etc/test-float-parse/tiny-pow10.rs b/src/etc/test-float-parse/tiny-pow10.rs
index 50ca5e32609..43fad5b49ee 100644
--- a/src/etc/test-float-parse/tiny-pow10.rs
+++ b/src/etc/test-float-parse/tiny-pow10.rs
@@ -1,13 +1,3 @@
-// Copyright 2015 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.
-
 mod _common;
 
 use _common::validate;
diff --git a/src/etc/test-float-parse/u32-small.rs b/src/etc/test-float-parse/u32-small.rs
index 571ac80e5b0..3ae62425adf 100644
--- a/src/etc/test-float-parse/u32-small.rs
+++ b/src/etc/test-float-parse/u32-small.rs
@@ -1,13 +1,3 @@
-// Copyright 2015 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.
-
 mod _common;
 
 use _common::validate;
diff --git a/src/etc/test-float-parse/u64-pow2.rs b/src/etc/test-float-parse/u64-pow2.rs
index 5b25c839931..1c9bda948ff 100644
--- a/src/etc/test-float-parse/u64-pow2.rs
+++ b/src/etc/test-float-parse/u64-pow2.rs
@@ -1,13 +1,3 @@
-// Copyright 2015 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.
-
 mod _common;
 
 use _common::validate;
diff --git a/src/etc/wasm32-shim.js b/src/etc/wasm32-shim.js
index 378aae59733..2a89c0d321d 100644
--- a/src/etc/wasm32-shim.js
+++ b/src/etc/wasm32-shim.js
@@ -1,13 +1,3 @@
-// Copyright 2017 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.
-
 // This is a small "shim" program which is used when wasm32 unit tests are run
 // in this repository. This program is intended to be run in node.js and will
 // load a wasm module into memory, instantiate it with a set of imports, and