Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit c98b075

Browse files
committedMar 13, 2017
Work towards getting tidy clean
1 parent af0f132 commit c98b075

13 files changed

+642
-8
lines changed
 

‎COPYRIGHT

+312
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,312 @@
1+
Short version for non-lawyers:
2+
3+
The Rust Project is dual-licensed under Apache 2.0 and MIT
4+
terms.
5+
6+
7+
Longer version:
8+
9+
The Rust Project is copyright 2010, The Rust Project
10+
Developers.
11+
12+
Licensed under the Apache License, Version 2.0
13+
<LICENSE-APACHE or
14+
http://www.apache.org/licenses/LICENSE-2.0> or the MIT
15+
license <LICENSE-MIT or http://opensource.org/licenses/MIT>,
16+
at your option. All files in the project carrying such
17+
notice may not be copied, modified, or distributed except
18+
according to those terms.
19+
20+
21+
The Rust Project includes packages written by third parties.
22+
The following third party packages are included, and carry
23+
their own copyright notices and license terms:
24+
25+
* The src/rt/miniz.c file, carrying an implementation of
26+
RFC1950/RFC1951 DEFLATE, by Rich Geldreich
27+
<richgel99@gmail.com>. All uses of this file are
28+
permitted by the embedded "unlicense" notice
29+
(effectively: public domain with warranty disclaimer).
30+
31+
* LLVM. Code for this package is found in src/llvm.
32+
33+
Copyright (c) 2003-2013 University of Illinois at
34+
Urbana-Champaign. All rights reserved.
35+
36+
Developed by:
37+
38+
LLVM Team
39+
40+
University of Illinois at Urbana-Champaign
41+
42+
http://llvm.org
43+
44+
Permission is hereby granted, free of charge, to any
45+
person obtaining a copy of this software and associated
46+
documentation files (the "Software"), to deal with the
47+
Software without restriction, including without
48+
limitation the rights to use, copy, modify, merge,
49+
publish, distribute, sublicense, and/or sell copies of
50+
the Software, and to permit persons to whom the Software
51+
is furnished to do so, subject to the following
52+
conditions:
53+
54+
* Redistributions of source code must retain the
55+
above copyright notice, this list of conditions
56+
and the following disclaimers.
57+
58+
* Redistributions in binary form must reproduce the
59+
above copyright notice, this list of conditions
60+
and the following disclaimers in the documentation
61+
and/or other materials provided with the
62+
distribution.
63+
64+
* Neither the names of the LLVM Team, University of
65+
Illinois at Urbana-Champaign, nor the names of its
66+
contributors may be used to endorse or promote
67+
products derived from this Software without
68+
specific prior written permission.
69+
70+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
71+
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
72+
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
73+
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
74+
SHALL THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE
75+
FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
76+
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT
77+
OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
78+
OTHER DEALINGS WITH THE SOFTWARE.
79+
80+
* Additional libraries included in LLVM carry separate
81+
BSD-compatible licenses. See src/llvm/LICENSE.txt for
82+
details.
83+
84+
* compiler-rt, in src/compiler-rt is dual licensed under
85+
LLVM's license and MIT:
86+
87+
Copyright (c) 2009-2014 by the contributors listed in
88+
CREDITS.TXT
89+
90+
All rights reserved.
91+
92+
Developed by:
93+
94+
LLVM Team
95+
96+
University of Illinois at Urbana-Champaign
97+
98+
http://llvm.org
99+
100+
Permission is hereby granted, free of charge, to any
101+
person obtaining a copy of this software and associated
102+
documentation files (the "Software"), to deal with the
103+
Software without restriction, including without
104+
limitation the rights to use, copy, modify, merge,
105+
publish, distribute, sublicense, and/or sell copies of
106+
the Software, and to permit persons to whom the Software
107+
is furnished to do so, subject to the following
108+
conditions:
109+
110+
* Redistributions of source code must retain the
111+
above copyright notice, this list of conditions
112+
and the following disclaimers.
113+
114+
* Redistributions in binary form must reproduce the
115+
above copyright notice, this list of conditions
116+
and the following disclaimers in the documentation
117+
and/or other materials provided with the
118+
distribution.
119+
120+
* Neither the names of the LLVM Team, University of
121+
Illinois at Urbana-Champaign, nor the names of its
122+
contributors may be used to endorse or promote
123+
products derived from this Software without
124+
specific prior written permission.
125+
126+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
127+
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
128+
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
129+
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
130+
SHALL THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE
131+
FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
132+
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT
133+
OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
134+
OTHER DEALINGS WITH THE SOFTWARE.
135+
136+
========================================================
137+
138+
Copyright (c) 2009-2014 by the contributors listed in
139+
CREDITS.TXT
140+
141+
Permission is hereby granted, free of charge, to any
142+
person obtaining a copy of this software and associated
143+
documentation files (the "Software"), to deal in the
144+
Software without restriction, including without
145+
limitation the rights to use, copy, modify, merge,
146+
publish, distribute, sublicense, and/or sell copies of
147+
the Software, and to permit persons to whom the Software
148+
is furnished to do so, subject to the following
149+
conditions:
150+
151+
The above copyright notice and this permission notice
152+
shall be included in all copies or substantial portions
153+
of the Software.
154+
155+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
156+
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
157+
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
158+
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
159+
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
160+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
161+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
162+
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
163+
DEALINGS IN THE SOFTWARE.
164+
165+
* Portions of the FFI code for interacting with the native ABI
166+
is derived from the Clay programming language, which carries
167+
the following license.
168+
169+
Copyright (C) 2008-2010 Tachyon Technologies.
170+
All rights reserved.
171+
172+
Redistribution and use in source and binary forms, with
173+
or without modification, are permitted provided that the
174+
following conditions are met:
175+
176+
1. Redistributions of source code must retain the above
177+
copyright notice, this list of conditions and the
178+
following disclaimer.
179+
180+
2. Redistributions in binary form must reproduce the
181+
above copyright notice, this list of conditions and
182+
the following disclaimer in the documentation and/or
183+
other materials provided with the distribution.
184+
185+
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR
186+
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
187+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
188+
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
189+
DEVELOPERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
190+
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
191+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
192+
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
193+
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
194+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
195+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
196+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
197+
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
198+
OF SUCH DAMAGE.
199+
200+
* Hoedown, the markdown parser, under src/rt/hoedown, is
201+
licensed as follows.
202+
203+
Copyright (c) 2008, Natacha Porté
204+
Copyright (c) 2011, Vicent Martí
205+
Copyright (c) 2013, Devin Torres and the Hoedown authors
206+
207+
Permission to use, copy, modify, and distribute this
208+
software for any purpose with or without fee is hereby
209+
granted, provided that the above copyright notice and
210+
this permission notice appear in all copies.
211+
212+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR
213+
DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
214+
INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
215+
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
216+
SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR
217+
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA
218+
OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
219+
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
220+
CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
221+
222+
* libbacktrace, under src/libbacktrace:
223+
224+
Copyright (C) 2012-2014 Free Software Foundation, Inc.
225+
Written by Ian Lance Taylor, Google.
226+
227+
Redistribution and use in source and binary forms, with
228+
or without modification, are permitted provided that the
229+
following conditions are met:
230+
231+
(1) Redistributions of source code must retain the
232+
above copyright notice, this list of conditions and
233+
the following disclaimer.
234+
235+
(2) Redistributions in binary form must reproduce
236+
the above copyright notice, this list of conditions
237+
and the following disclaimer in the documentation
238+
and/or other materials provided with the
239+
distribution.
240+
241+
(3) The name of the author may not be used to
242+
endorse or promote products derived from this
243+
software without specific prior written permission.
244+
245+
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
246+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
247+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
248+
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
249+
NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
250+
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
251+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
252+
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
253+
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
254+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
255+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
256+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
257+
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
258+
OF SUCH DAMAGE. */
259+
260+
* jemalloc, under src/jemalloc:
261+
262+
Copyright (C) 2002-2014 Jason Evans
263+
<jasone@canonware.com>. All rights reserved.
264+
Copyright (C) 2007-2012 Mozilla Foundation.
265+
All rights reserved.
266+
Copyright (C) 2009-2014 Facebook, Inc.
267+
All rights reserved.
268+
269+
Redistribution and use in source and binary forms, with or without
270+
modification, are permitted provided that the following conditions are met:
271+
1. Redistributions of source code must retain the above copyright notice(s),
272+
this list of conditions and the following disclaimer.
273+
2. Redistributions in binary form must reproduce the above copyright notice(s),
274+
this list of conditions and the following disclaimer in the documentation
275+
and/or other materials provided with the distribution.
276+
277+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S)
278+
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
279+
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
280+
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
281+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S)
282+
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
283+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
284+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
285+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
286+
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
287+
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
288+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
289+
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
290+
OF SUCH DAMAGE.
291+
292+
* Additional copyright may be retained by contributors other
293+
than Mozilla, the Rust Project Developers, or the parties
294+
enumerated in this file. Such copyright can be determined
295+
on a case-by-case basis by examining the author of each
296+
portion of a file in the revision-control commit records
297+
of the project, or by consulting representative comments
298+
claiming copyright ownership for a file.
299+
300+
For example, the text:
301+
302+
"Copyright (c) 2011 Google Inc."
303+
304+
appears in some files, and these files thereby denote
305+
that their author and copyright-holder is Google Inc.
306+
307+
In all such cases, the absence of explicit licensing text
308+
indicates that the contributor chose to license their work
309+
for distribution under identical terms to those Mozilla
310+
has chosen for the collective work, enumerated at the top
311+
of this file. The only difference is the retention of
312+
copyright itself, held by the contributor.

‎LICENSE-APACHE

+201
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,201 @@
1+
Apache License
2+
Version 2.0, January 2004
3+
http://www.apache.org/licenses/
4+
5+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6+
7+
1. Definitions.
8+
9+
"License" shall mean the terms and conditions for use, reproduction,
10+
and distribution as defined by Sections 1 through 9 of this document.
11+
12+
"Licensor" shall mean the copyright owner or entity authorized by
13+
the copyright owner that is granting the License.
14+
15+
"Legal Entity" shall mean the union of the acting entity and all
16+
other entities that control, are controlled by, or are under common
17+
control with that entity. For the purposes of this definition,
18+
"control" means (i) the power, direct or indirect, to cause the
19+
direction or management of such entity, whether by contract or
20+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
21+
outstanding shares, or (iii) beneficial ownership of such entity.
22+
23+
"You" (or "Your") shall mean an individual or Legal Entity
24+
exercising permissions granted by this License.
25+
26+
"Source" form shall mean the preferred form for making modifications,
27+
including but not limited to software source code, documentation
28+
source, and configuration files.
29+
30+
"Object" form shall mean any form resulting from mechanical
31+
transformation or translation of a Source form, including but
32+
not limited to compiled object code, generated documentation,
33+
and conversions to other media types.
34+
35+
"Work" shall mean the work of authorship, whether in Source or
36+
Object form, made available under the License, as indicated by a
37+
copyright notice that is included in or attached to the work
38+
(an example is provided in the Appendix below).
39+
40+
"Derivative Works" shall mean any work, whether in Source or Object
41+
form, that is based on (or derived from) the Work and for which the
42+
editorial revisions, annotations, elaborations, or other modifications
43+
represent, as a whole, an original work of authorship. For the purposes
44+
of this License, Derivative Works shall not include works that remain
45+
separable from, or merely link (or bind by name) to the interfaces of,
46+
the Work and Derivative Works thereof.
47+
48+
"Contribution" shall mean any work of authorship, including
49+
the original version of the Work and any modifications or additions
50+
to that Work or Derivative Works thereof, that is intentionally
51+
submitted to Licensor for inclusion in the Work by the copyright owner
52+
or by an individual or Legal Entity authorized to submit on behalf of
53+
the copyright owner. For the purposes of this definition, "submitted"
54+
means any form of electronic, verbal, or written communication sent
55+
to the Licensor or its representatives, including but not limited to
56+
communication on electronic mailing lists, source code control systems,
57+
and issue tracking systems that are managed by, or on behalf of, the
58+
Licensor for the purpose of discussing and improving the Work, but
59+
excluding communication that is conspicuously marked or otherwise
60+
designated in writing by the copyright owner as "Not a Contribution."
61+
62+
"Contributor" shall mean Licensor and any individual or Legal Entity
63+
on behalf of whom a Contribution has been received by Licensor and
64+
subsequently incorporated within the Work.
65+
66+
2. Grant of Copyright License. Subject to the terms and conditions of
67+
this License, each Contributor hereby grants to You a perpetual,
68+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69+
copyright license to reproduce, prepare Derivative Works of,
70+
publicly display, publicly perform, sublicense, and distribute the
71+
Work and such Derivative Works in Source or Object form.
72+
73+
3. Grant of Patent License. Subject to the terms and conditions of
74+
this License, each Contributor hereby grants to You a perpetual,
75+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76+
(except as stated in this section) patent license to make, have made,
77+
use, offer to sell, sell, import, and otherwise transfer the Work,
78+
where such license applies only to those patent claims licensable
79+
by such Contributor that are necessarily infringed by their
80+
Contribution(s) alone or by combination of their Contribution(s)
81+
with the Work to which such Contribution(s) was submitted. If You
82+
institute patent litigation against any entity (including a
83+
cross-claim or counterclaim in a lawsuit) alleging that the Work
84+
or a Contribution incorporated within the Work constitutes direct
85+
or contributory patent infringement, then any patent licenses
86+
granted to You under this License for that Work shall terminate
87+
as of the date such litigation is filed.
88+
89+
4. Redistribution. You may reproduce and distribute copies of the
90+
Work or Derivative Works thereof in any medium, with or without
91+
modifications, and in Source or Object form, provided that You
92+
meet the following conditions:
93+
94+
(a) You must give any other recipients of the Work or
95+
Derivative Works a copy of this License; and
96+
97+
(b) You must cause any modified files to carry prominent notices
98+
stating that You changed the files; and
99+
100+
(c) You must retain, in the Source form of any Derivative Works
101+
that You distribute, all copyright, patent, trademark, and
102+
attribution notices from the Source form of the Work,
103+
excluding those notices that do not pertain to any part of
104+
the Derivative Works; and
105+
106+
(d) If the Work includes a "NOTICE" text file as part of its
107+
distribution, then any Derivative Works that You distribute must
108+
include a readable copy of the attribution notices contained
109+
within such NOTICE file, excluding those notices that do not
110+
pertain to any part of the Derivative Works, in at least one
111+
of the following places: within a NOTICE text file distributed
112+
as part of the Derivative Works; within the Source form or
113+
documentation, if provided along with the Derivative Works; or,
114+
within a display generated by the Derivative Works, if and
115+
wherever such third-party notices normally appear. The contents
116+
of the NOTICE file are for informational purposes only and
117+
do not modify the License. You may add Your own attribution
118+
notices within Derivative Works that You distribute, alongside
119+
or as an addendum to the NOTICE text from the Work, provided
120+
that such additional attribution notices cannot be construed
121+
as modifying the License.
122+
123+
You may add Your own copyright statement to Your modifications and
124+
may provide additional or different license terms and conditions
125+
for use, reproduction, or distribution of Your modifications, or
126+
for any such Derivative Works as a whole, provided Your use,
127+
reproduction, and distribution of the Work otherwise complies with
128+
the conditions stated in this License.
129+
130+
5. Submission of Contributions. Unless You explicitly state otherwise,
131+
any Contribution intentionally submitted for inclusion in the Work
132+
by You to the Licensor shall be under the terms and conditions of
133+
this License, without any additional terms or conditions.
134+
Notwithstanding the above, nothing herein shall supersede or modify
135+
the terms of any separate license agreement you may have executed
136+
with Licensor regarding such Contributions.
137+
138+
6. Trademarks. This License does not grant permission to use the trade
139+
names, trademarks, service marks, or product names of the Licensor,
140+
except as required for reasonable and customary use in describing the
141+
origin of the Work and reproducing the content of the NOTICE file.
142+
143+
7. Disclaimer of Warranty. Unless required by applicable law or
144+
agreed to in writing, Licensor provides the Work (and each
145+
Contributor provides its Contributions) on an "AS IS" BASIS,
146+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147+
implied, including, without limitation, any warranties or conditions
148+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149+
PARTICULAR PURPOSE. You are solely responsible for determining the
150+
appropriateness of using or redistributing the Work and assume any
151+
risks associated with Your exercise of permissions under this License.
152+
153+
8. Limitation of Liability. In no event and under no legal theory,
154+
whether in tort (including negligence), contract, or otherwise,
155+
unless required by applicable law (such as deliberate and grossly
156+
negligent acts) or agreed to in writing, shall any Contributor be
157+
liable to You for damages, including any direct, indirect, special,
158+
incidental, or consequential damages of any character arising as a
159+
result of this License or out of the use or inability to use the
160+
Work (including but not limited to damages for loss of goodwill,
161+
work stoppage, computer failure or malfunction, or any and all
162+
other commercial damages or losses), even if such Contributor
163+
has been advised of the possibility of such damages.
164+
165+
9. Accepting Warranty or Additional Liability. While redistributing
166+
the Work or Derivative Works thereof, You may choose to offer,
167+
and charge a fee for, acceptance of support, warranty, indemnity,
168+
or other liability obligations and/or rights consistent with this
169+
License. However, in accepting such obligations, You may act only
170+
on Your own behalf and on Your sole responsibility, not on behalf
171+
of any other Contributor, and only if You agree to indemnify,
172+
defend, and hold each Contributor harmless for any liability
173+
incurred by, or claims asserted against, such Contributor by reason
174+
of your accepting any such warranty or additional liability.
175+
176+
END OF TERMS AND CONDITIONS
177+
178+
APPENDIX: How to apply the Apache License to your work.
179+
180+
To apply the Apache License to your work, attach the following
181+
boilerplate notice, with the fields enclosed by brackets "[]"
182+
replaced with your own identifying information. (Don't include
183+
the brackets!) The text should be enclosed in the appropriate
184+
comment syntax for the file format. We also recommend that a
185+
file or class name and description of purpose be included on the
186+
same "printed page" as the copyright notice for easier
187+
identification within third-party archives.
188+
189+
Copyright [yyyy] [name of copyright owner]
190+
191+
Licensed under the Apache License, Version 2.0 (the "License");
192+
you may not use this file except in compliance with the License.
193+
You may obtain a copy of the License at
194+
195+
http://www.apache.org/licenses/LICENSE-2.0
196+
197+
Unless required by applicable law or agreed to in writing, software
198+
distributed under the License is distributed on an "AS IS" BASIS,
199+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200+
See the License for the specific language governing permissions and
201+
limitations under the License.

‎LICENSE-MIT

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Copyright (c) 2010 The Rust Project Developers
2+
3+
Permission is hereby granted, free of charge, to any
4+
person obtaining a copy of this software and associated
5+
documentation files (the "Software"), to deal in the
6+
Software without restriction, including without
7+
limitation the rights to use, copy, modify, merge,
8+
publish, distribute, sublicense, and/or sell copies of
9+
the Software, and to permit persons to whom the Software
10+
is furnished to do so, subject to the following
11+
conditions:
12+
13+
The above copyright notice and this permission notice
14+
shall be included in all copies or substantial portions
15+
of the Software.
16+
17+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
18+
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
19+
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
20+
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
21+
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
22+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
23+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
24+
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25+
DEALINGS IN THE SOFTWARE.

‎ci/build.sh

+10
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
# Copyright 2016 The Rust Project Developers. See the COPYRIGHT
2+
# file at the top-level directory of this distribution and at
3+
# http://rust-lang.org/COPYRIGHT.
4+
#
5+
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
# option. This file may not be copied, modified, or distributed
9+
# except according to those terms.
10+
111
export PATH=$PATH:/home/travis/.cargo/bin;
212

313
# tests for the second edition

‎ci/deploy.sh

+9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
#!/bin/bash
2+
# Copyright 2016 The Rust Project Developers. See the COPYRIGHT
3+
# file at the top-level directory of this distribution and at
4+
# http://rust-lang.org/COPYRIGHT.
5+
#
6+
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
7+
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
8+
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
9+
# option. This file may not be copied, modified, or distributed
10+
# except according to those terms.
211

312
set -o errexit -o nounset
413

‎second-edition/doc-to-md.sh

+9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
#!/bin/bash
2+
# Copyright 2016 The Rust Project Developers. See the COPYRIGHT
3+
# file at the top-level directory of this distribution and at
4+
# http://rust-lang.org/COPYRIGHT.
5+
#
6+
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
7+
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
8+
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
9+
# option. This file may not be copied, modified, or distributed
10+
# except according to those terms.
211

312
set -eu
413

‎second-edition/nostarch.sh

+12-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
#!/bin/bash
2+
# Copyright 2016 The Rust Project Developers. See the COPYRIGHT
3+
# file at the top-level directory of this distribution and at
4+
# http://rust-lang.org/COPYRIGHT.
5+
#
6+
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
7+
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
8+
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
9+
# option. This file may not be copied, modified, or distributed
10+
# except according to those terms.
211

312
set -eu
413

@@ -16,7 +25,9 @@ xargs -n 1 basename | \
1625
# Remove all links followed by <!-- ignore -->, then
1726
# Change all remaining links from markdown to italicized inline text.
1827
while IFS= read -r filename; do
19-
< "src/$filename" cargo run --bin remove_links | cargo run --bin link2print | cargo run --bin remove_markup > "tmp/$filename"
28+
< "src/$filename" cargo run --bin remove_links \
29+
| cargo run --bin link2print \
30+
| cargo run --bin remove_markup > "tmp/$filename"
2031
done
2132
# Concat the files into the nostarch dir.
2233
cargo run --bin concat_chapters tmp nostarch

‎second-edition/spellcheck.sh

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
#!/bin/bash
2+
# Copyright 2016 The Rust Project Developers. See the COPYRIGHT
3+
# file at the top-level directory of this distribution and at
4+
# http://rust-lang.org/COPYRIGHT.
5+
#
6+
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
7+
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
8+
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
9+
# option. This file may not be copied, modified, or distributed
10+
# except according to those terms.
211

312
aspell --version
413

@@ -68,7 +77,7 @@ elif [[ "$mode" == "list" ]]; then
6877
command=$(aspell --ignore 3 --personal="$dict_path" "$mode" < "$fname")
6978
if [[ -n "$command" ]]; then
7079
for error in $command; do
71-
# TODO: Find more correct way to get line number
80+
# FIXME: Find more correct way to get line number
7281
# (ideally from aspell). Now it can make some false positives,
7382
# because it is just a grep
7483
grep --with-filename --line-number --color=always "$error" "$fname"

‎second-edition/tools/src/bin/concat_chapters.rs

+10
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
111
#[macro_use] extern crate lazy_static;
212
extern crate regex;
313

‎second-edition/tools/src/bin/lfp.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,10 @@ fn is_file_of_interest(path: &path::Path) -> bool {
105105

106106
fn is_line_of_interest(line: &str) -> bool {
107107
!line.split_whitespace()
108-
.filter(|sub_string| sub_string.contains("file://") && !sub_string.contains("file:///projects/"))
108+
.filter(|sub_string|
109+
sub_string.contains("file://") &&
110+
!sub_string.contains("file:///projects/")
111+
)
109112
.collect::<Vec<_>>()
110113
.is_empty()
111114
}

‎second-edition/tools/src/bin/link2print.rs

+12-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
111
extern crate regex;
212

313
use std::collections::HashMap;
@@ -24,7 +34,7 @@ fn write_md(output: String) {
2434

2535
fn parse_references(buffer: String) -> (String, HashMap<String, String>) {
2636
let mut ref_map = HashMap::new();
27-
// TODO: Currently doesn't handle "title" in following line
37+
// FIXME: Currently doesn't handle "title" in following line
2838
let re = Regex::new(r###"(?m)\n?^ {0,3}\[([^]]+)\]:[[:blank:]]*(.*)$"###).unwrap();
2939
let output = re.replace_all(&buffer, |caps: &Captures| {
3040
let key = caps.at(1).unwrap().to_owned().to_uppercase();
@@ -38,7 +48,7 @@ fn parse_references(buffer: String) -> (String, HashMap<String, String>) {
3848
}
3949

4050
fn parse_links((buffer, ref_map): (String, HashMap<String, String>)) -> String {
41-
// TODO: check which punctuation is allowed by spec
51+
// FIXME: check which punctuation is allowed by spec
4252
let re = Regex::new(r###"(?:(?P<pre>(?:```(?:[^`]|`[^`])*`?\n```\n)|(?:[^[]`[^`\n]+[\n]?[^`\n]*`))|(?:\[(?P<name>[^]]+)\](?:(?:\([[:blank:]]*(?P<val>[^")]*[^ ])(?:[[:blank:]]*"[^"]*")?\))|(?:\[(?P<key>[^]]*)\]))?))"###).expect("could not create regex");
4353
let output = re.replace_all(&buffer, |caps: &Captures| {
4454
match caps.name("pre") {

‎second-edition/tools/src/bin/remove_links.rs

+13-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
111
extern crate regex;
212

313
use std::io;
@@ -14,7 +24,8 @@ fn main () {
1424
let mut refs = HashSet::new();
1525

1626
// capture all links and link references
17-
let link_regex = Regex::new(r"\[([^\]]+)\](?:(?:\[([^\]]+)\])|(?:\([^\)]+\)))(?i)<!-- ignore -->").unwrap();
27+
let regex = r"\[([^\]]+)\](?:(?:\[([^\]]+)\])|(?:\([^\)]+\)))(?i)<!-- ignore -->";
28+
let link_regex = Regex::new(regex).unwrap();
1829
let first_pass = link_regex.replace_all(&buffer, |caps: &Captures| {
1930

2031
// save the link reference we want to delete
@@ -41,4 +52,4 @@ fn main () {
4152
});
4253

4354
write!(io::stdout(), "{}", out).unwrap();
44-
}
55+
}

‎second-edition/tools/src/bin/remove_markup.rs

+15-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
111
extern crate regex;
212
use std::io;
313
use std::io::{Read, Write};
@@ -24,7 +34,11 @@ fn remove_markup(input: String) -> String {
2434

2535
let lines: Vec<_> = input.lines().flat_map(|line| {
2636
// Remove our figure and caption markup
27-
if line == "<figure>" || line == "<figcaption>" || line == "</figcaption>" || line == "</figure>" {
37+
if line == "<figure>" ||
38+
line == "<figcaption>" ||
39+
line == "</figcaption>" ||
40+
line == "</figure>"
41+
{
2842
None
2943
// Remove our syntax highlighting and rustdoc markers
3044
} else if line.starts_with("```") {

0 commit comments

Comments
 (0)
Please sign in to comment.