Skip to content

Commit dd23fda

Browse files
author
Clar Charr
committed
Make rustdoc.js use license comments.
1 parent 03eb710 commit dd23fda

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

src/librustdoc/html/static/main.js

+11-9
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
// Copyright 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.
1+
/*!
2+
* Copyright 2014 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.
11+
*/
1012

1113
/*jslint browser: true, es5: true */
1214
/*globals $: true, rootPath: true */

src/tools/tidy/src/style.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,10 @@ fn licenseck(file: &Path, contents: &str) -> bool {
169169
lines.windows(LICENSE.lines().count()).any(|window| {
170170
let offset = if window.iter().all(|w| w.starts_with("//")) {
171171
2
172-
} else if window.iter().all(|w| w.starts_with("#")) {
172+
} else if window.iter().all(|w| w.starts_with('#')) {
173173
1
174+
} else if window.iter().all(|w| w.starts_with(" *")) {
175+
2
174176
} else {
175177
return false
176178
};

0 commit comments

Comments
 (0)