fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1<!DOCTYPE html> 2<!-- 3Welcome to a Clippy's lint list, at least the source code of it. If you are 4interested in contributing to this website checkout `util/gh-pages/index.html` 5inside the rust-clippy repository. 6 7Otherwise, have a great day =^.^= 8--> 9<html lang="en"> 10<head> 11 <meta charset="UTF-8"/> 12 <meta name="viewport" content="width=device-width, initial-scale=1"/> 13 <meta name="description" content="A collection of lints to catch common mistakes and improve your Rust code."> 14 15 <title>Clippy Lints</title> 16 17 <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/css/bootstrap.min.css"/> 18 <link id="githubLightHighlight" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.6.0/styles/github.min.css" disabled="true" /> 19 <link id="githubDarkHighlight" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.6.0/styles/github-dark.min.css" disabled="true" /> 20 21 <!-- The files are not copied over into the Clippy project since they use the MPL-2.0 License --> 22 <link rel="stylesheet" href="https://rust-lang.github.io/mdBook/css/variables.css"/> 23 <link id="styleHighlight" rel="stylesheet" href="https://rust-lang.github.io/mdBook/highlight.css"> 24 <link id="styleNight" rel="stylesheet" href="https://rust-lang.github.io/mdBook/tomorrow-night.css" disabled="true"> 25 <link id="styleAyu" rel="stylesheet" href="https://rust-lang.github.io/mdBook/ayu-highlight.css" disabled="true"> 26 <style> 27 blockquote { font-size: 1em; } 28 [ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak { display: none !important; } 29 30 .dropdown-menu { 31 color: var(--fg); 32 background: var(--theme-popup-bg); 33 border: 1px solid var(--theme-popup-border); 34 } 35 36 .dropdown-menu .divider { 37 background-color: var(--theme-popup-border); 38 } 39 40 .dropdown-menu .checkbox { 41 display: block; 42 white-space: nowrap; 43 margin: 0; 44 } 45 .dropdown-menu .checkbox label { 46 padding: 3px 20px; 47 width: 100%; 48 } 49 50 .dropdown-menu .checkbox input { 51 position: relative; 52 margin: 0 0.5rem 0; 53 padding: 0; 54 } 55 56 .dropdown-menu .checkbox:hover { 57 background-color: var(--theme-hover); 58 } 59 60 div.panel div.panel-body button.dropdown-toggle { 61 background: var(--searchbar-bg); 62 color: var(--searchbar-fg); 63 border-color: var(--theme-popup-border); 64 } 65 66 div.panel div.panel-body button.dropdown-toggle:hover { 67 box-shadow: 0 0 3px var(--searchbar-shadow-color); 68 } 69 70 div.panel div.panel-body .open button.dropdown-toggle { 71 background: var(--searchbar-bg); 72 color: var(--searchbar-fg); 73 border-color: var(--theme-popup-border); 74 filter: brightness(90%); 75 } 76 77 .dropdown-toggle .badge { 78 background-color: #777; 79 } 80 81 .panel-heading { cursor: pointer; } 82 83 .panel-title { display: flex; flex-wrap: wrap;} 84 .panel-title .label { display: inline-block; } 85 86 .panel-title-name { flex: 1; min-width: 400px;} 87 .panel-title-name span { vertical-align: bottom; } 88 89 .panel .panel-title-name .anchor { display: none; } 90 .panel:hover .panel-title-name .anchor { display: inline;} 91 92 .search-control { 93 margin-top: 15px; 94 } 95 96 @media (min-width: 992px) { 97 .search-control { 98 margin-top: 0; 99 float: right; 100 } 101 } 102 103 @media (min-width: 405px) { 104 #upper-filters { 105 display: flex; 106 } 107 } 108 109 @media (max-width: 430px) { 110 /* Turn the version filter list to the left */ 111 #version-filter-selector { 112 right: 0; 113 left: auto; 114 } 115 } 116 117 @media (max-width: 412px) { 118 #upper-filters, 119 .panel-body .search-control { 120 padding-right: 8px; 121 padding-left: 8px; 122 } 123 } 124 125 .label { 126 padding-top: 0.3em; 127 padding-bottom: 0.3em; 128 } 129 130 .label-lint-group { 131 min-width: 8em; 132 } 133 .label-lint-level { 134 min-width: 4em; 135 } 136 137 .label-lint-level-allow { 138 background-color: #5cb85c; 139 } 140 .label-lint-level-warn { 141 background-color: #f0ad4e; 142 } 143 .label-lint-level-deny { 144 background-color: #d9534f; 145 } 146 .label-lint-level-none { 147 background-color: #777777; 148 opacity: 0.5; 149 } 150 151 .label-group-deprecated { 152 opacity: 0.5; 153 } 154 155 .label-doc-folding { 156 color: #000; 157 background-color: #fff; 158 border: 1px solid var(--theme-popup-border); 159 } 160 .label-doc-folding:hover { 161 background-color: #e6e6e6; 162 } 163 164 .lint-doc-md > h3 { 165 border-top: 1px solid var(--theme-popup-border); 166 padding: 10px 15px; 167 margin: 0 -15px; 168 font-size: 18px; 169 } 170 .lint-doc-md > h3:first-child { 171 border-top: none; 172 padding-top: 0px; 173 } 174 175 @media (max-width:749px) { 176 .lint-additional-info-container { 177 display: flex; 178 flex-flow: column; 179 } 180 .lint-additional-info-item + .lint-additional-info-item { 181 border-top: 1px solid var(--theme-popup-border); 182 } 183 } 184 @media (min-width:750px) { 185 .lint-additional-info-container { 186 display: flex; 187 flex-flow: row; 188 } 189 .lint-additional-info-item + .lint-additional-info-item { 190 border-left: 1px solid var(--theme-popup-border); 191 } 192 } 193 194 .lint-additional-info-item { 195 display: inline-flex; 196 min-width: 200px; 197 flex-grow: 1; 198 padding: 9px 5px 5px 15px; 199 } 200 201 .label-applicability { 202 background-color: #777777; 203 margin: auto 5px; 204 } 205 206 .label-version { 207 background-color: #777777; 208 margin: auto 5px; 209 font-family: monospace; 210 } 211 212 details { 213 border-radius: 4px; 214 padding: .5em .5em 0; 215 } 216 217 code { 218 white-space: pre !important; 219 } 220 221 summary { 222 font-weight: bold; 223 margin: -.5em -.5em 0; 224 padding: .5em; 225 display: revert; 226 } 227 228 details[open] { 229 padding: .5em; 230 } 231 </style> 232 <style> 233 /* Expanding the mdBoom theme*/ 234 .light { 235 --inline-code-bg: #f6f7f6; 236 } 237 .rust { 238 --inline-code-bg: #f6f7f6; 239 } 240 .coal { 241 --inline-code-bg: #1d1f21; 242 } 243 .navy { 244 --inline-code-bg: #1d1f21; 245 } 246 .ayu { 247 --inline-code-bg: #191f26; 248 } 249 250 .theme-dropdown { 251 position: absolute; 252 margin: 0.7em; 253 z-index: 10; 254 } 255 256 /* Applying the mdBook theme */ 257 .theme-icon { 258 text-align: center; 259 width: 2em; 260 height: 2em; 261 line-height: 2em; 262 border: solid 1px var(--icons); 263 border-radius: 5px; 264 user-select: none; 265 cursor: pointer; 266 } 267 .theme-icon:hover { 268 background: var(--theme-hover); 269 } 270 .theme-choice { 271 display: none; 272 list-style: none; 273 border: 1px solid var(--theme-popup-border); 274 border-radius: 5px; 275 color: var(--fg); 276 background: var(--theme-popup-bg); 277 padding: 0 0; 278 overflow: hidden; 279 } 280 281 .theme-dropdown.open .theme-choice { 282 display: block; 283 } 284 285 .theme-choice > li { 286 padding: 5px 10px; 287 font-size: 0.8em; 288 user-select: none; 289 cursor: pointer; 290 } 291 292 .theme-choice > li:hover { 293 background: var(--theme-hover); 294 } 295 296 .alert { 297 color: var(--fg); 298 background: var(--theme-hover); 299 border: 1px solid var(--theme-popup-border); 300 } 301 .page-header { 302 border-color: var(--theme-popup-border); 303 } 304 .panel-default > .panel-heading { 305 background: var(--theme-hover); 306 color: var(--fg); 307 border: 1px solid var(--theme-popup-border); 308 } 309 .panel-default > .panel-heading:hover { 310 filter: brightness(90%); 311 } 312 .list-group-item { 313 background: 0%; 314 border: 1px solid var(--theme-popup-border); 315 } 316 .panel, pre, hr { 317 background: var(--bg); 318 border: 1px solid var(--theme-popup-border); 319 } 320 321 #version-filter-selector .checkbox { 322 display: flex; 323 } 324 325 #version-filter { 326 min-width: available; 327 } 328 329 #version-filter li label { 330 padding-right: 0; 331 width: 35%; 332 } 333 334 .version-filter-input { 335 height: 60%; 336 width: 30%; 337 text-align: center; 338 border: none; 339 border-bottom: 1px solid #000000; 340 } 341 342 #filter-label, .filter-clear { 343 background: var(--searchbar-bg); 344 color: var(--searchbar-fg); 345 border-color: var(--theme-popup-border); 346 filter: brightness(95%); 347 } 348 #filter-label:hover, .filter-clear:hover { 349 filter: brightness(90%); 350 } 351 .filter-input { 352 background: var(--searchbar-bg); 353 color: var(--searchbar-fg); 354 border-color: var(--theme-popup-border); 355 } 356 357 .filter-input::-webkit-input-placeholder, 358 .filter-input::-moz-placeholder { 359 color: var(--searchbar-fg); 360 opacity: 30%; 361 } 362 363 :not(pre) > code { 364 color: var(--inline-code-color); 365 background-color: var(--inline-code-bg); 366 } 367 html { 368 scrollbar-color: var(--scrollbar) var(--bg); 369 } 370 body { 371 background: var(--bg); 372 color: var(--fg); 373 } 374 375 </style> 376</head> 377<body ng-app="clippy" ng-controller="lintList"> 378 <div theme-dropdown class="theme-dropdown"> 379 <div id="theme-icon" class="theme-icon">🖌</div> 380 <ul id="theme-menu" class="theme-choice"> 381 <li id="{{id}}" ng-repeat="(id, name) in themes" ng-click="selectTheme(id)">{{name}}</li> 382 </ul> 383 </div> 384 385 <div class="container"> 386 <div class="page-header"> 387 <h1>Clippy Lints</h1> 388 </div> 389 390 <noscript> 391 <div class="alert alert-danger" role="alert"> 392 Sorry, this site only works with JavaScript! :( 393 </div> 394 </noscript> 395 396 <div ng-cloak> 397 398 <div class="alert alert-info" role="alert" ng-if="loading"> 399 Loading… 400 </div> 401 <div class="alert alert-danger" role="alert" ng-if="error"> 402 Error loading lints! 403 </div> 404 405 <div class="panel panel-default" ng-show="data"> 406 <div class="panel-body row"> 407 <div id="upper-filters" class="col-12 col-md-4"> 408 <div class="btn-group" filter-dropdown> 409 <button type="button" class="btn btn-default dropdown-toggle"> 410 Lint levels <span class="badge">{{selectedValuesCount(levels)}}</span> <span class="caret"></span> 411 </button> 412 <ul class="dropdown-menu"> 413 <li class="checkbox"> 414 <label ng-click="toggleLevels(true)"> 415 <input type="checkbox" class="invisible" /> 416 All 417 </label> 418 </li> 419 <li class="checkbox"> 420 <label ng-click="toggleLevels(false)"> 421 <input type="checkbox" class="invisible" /> 422 None 423 </label> 424 </li> 425 <li role="separator" class="divider"></li> 426 <li class="checkbox" ng-repeat="(level, enabled) in levels"> 427 <label class="text-capitalize"> 428 <input type="checkbox" ng-model="levels[level]" /> 429 {{level}} 430 </label> 431 </li> 432 </ul> 433 </div> 434 <div class="btn-group" filter-dropdown> 435 <button type="button" class="btn btn-default dropdown-toggle"> 436 Lint groups <span class="badge">{{selectedValuesCount(groups)}}</span> <span class="caret"></span> 437 </button> 438 <ul class="dropdown-menu"> 439 <li class="checkbox"> 440 <label ng-click="toggleGroups(true)"> 441 <input type="checkbox" class="invisible" /> 442 All 443 </label> 444 </li> 445 <li class="checkbox"> 446 <label ng-click="resetGroupsToDefault()"> 447 <input type="checkbox" class="invisible" /> 448 Default 449 </label> 450 </li> 451 <li class="checkbox"> 452 <label ng-click="toggleGroups(false)"> 453 <input type="checkbox" class="invisible" /> 454 None 455 </label> 456 </li> 457 <li role="separator" class="divider"></li> 458 <li class="checkbox" ng-repeat="(group, enabled) in groups"> 459 <label class="text-capitalize"> 460 <input type="checkbox" ng-model="groups[group]" /> 461 {{group}} 462 </label> 463 </li> 464 </ul> 465 </div> 466 <div id="version-filter"> 467 <div class="btn-group" filter-dropdown> 468 <button type="button" class="btn btn-default dropdown-toggle"> 469 Version 470 <span id="version-filter-count" class="badge"> 471 {{versionFilterCount(versionFilters)}} 472 </span> 473 <span class="caret"></span> 474 </button> 475 <ul id="version-filter-selector" class="dropdown-menu"> 476 <li class="checkbox"> 477 <label ng-click="clearVersionFilters()"> 478 <input type="checkbox" class="invisible" /> 479 Clear filters 480 </label> 481 </li> 482 <li role="separator" class="divider"></li> 483 <li class="checkbox" ng-repeat="(filter, vars) in versionFilters"> 484 <label ng-attr-for="filter-{filter}">{{filter}}</label> 485 <span>1.</span> 486 <input type="number" 487 min="29" 488 ng-attr-id="filter-{filter}" 489 class="version-filter-input form-control filter-input" 490 maxlength="2" 491 ng-model="versionFilters[filter].minorVersion" 492 ng-model-options="{debounce: 50}" 493 ng-change="updateVersionFilters()" /> 494 <span>.0</span> 495 </li> 496 </ul> 497 </div> 498 </div> 499 500 </div> 501 <div class="col-12 col-md-7 search-control"> 502 <div class="input-group"> 503 <label class="input-group-addon" id="filter-label" for="search-input">Filter:</label> 504 <input type="text" class="form-control filter-input" placeholder="Keywords or search string" id="search-input" 505 ng-model="search" ng-blur="updatePath()" ng-keyup="$event.keyCode == 13 && updatePath()" 506 ng-model-options="{debounce: 50}" /> 507 <span class="input-group-btn"> 508 <button class="filter-clear btn" type="button" ng-click="search = ''; updatePath();"> 509 Clear 510 </button> 511 </span> 512 </div> 513 </div> 514 </div> 515 </div> 516 <!-- The order of the filters should be from most likely to remove a lint to least likely to improve performance. --> 517 <article class="panel panel-default" id="{{lint.id}}" ng-repeat="lint in data | filter:bySearch | filter:byGroups | filter:byLevels | filter:byVersion"> 518 <header class="panel-heading" ng-click="open[lint.id] = !open[lint.id]"> 519 <h2 class="panel-title"> 520 <div class="panel-title-name"> 521 <span>{{lint.id}}</span> 522 <a href="#{{lint.id}}" class="anchor label label-default" 523 ng-click="openLint(lint); $event.preventDefault(); $event.stopPropagation()">¶</a> 524 <a href="" id="clipboard-{{lint.id}}" class="anchor label label-default" ng-click="copyToClipboard(lint); $event.stopPropagation()"> 525 📋 526 </a> 527 </div> 528 529 <div class="panel-title-addons"> 530 <span class="label label-lint-group label-default label-group-{{lint.group}}">{{lint.group}}</span> 531 532 <span class="label label-lint-level label-lint-level-{{lint.level}}">{{lint.level}}</span> 533 534 535 <span class="label label-doc-folding" ng-show="open[lint.id]">−</span> 536 <span class="label label-doc-folding" ng-hide="open[lint.id]">+</span> 537 </div> 538 </h2> 539 </header> 540 541 <div class="list-group lint-docs" ng-if="open[lint.id]" ng-class="{collapse: true, in: open[lint.id]}"> 542 <div class="list-group-item lint-doc-md" ng-bind-html="lint.docs | markdown"></div> 543 <div class="lint-additional-info-container"> 544 <!-- Applicability --> 545 <div class="lint-additional-info-item"> 546 <span> Applicability: </span> 547 <span class="label label-default label-applicability">{{lint.applicability.applicability}}</span> 548 <a href="https://doc.rust-lang.org/nightly/nightly-rustc/rustc_lint_defs/enum.Applicability.html#variants">(?)</a> 549 </div> 550 <!-- Clippy version --> 551 <div class="lint-additional-info-item"> 552 <span>{{lint.group == "deprecated" ? "Deprecated" : "Added"}} in: </span> 553 <span class="label label-default label-version">{{lint.version}}</span> 554 </div> 555 <!-- Open related issues --> 556 <div class="lint-additional-info-item"> 557 <a href="https://github.com/rust-lang/rust-clippy/issues?q=is%3Aissue+{{lint.id}}">Related Issues</a> 558 </div> 559 <!-- Jump to source --> 560 <div class="lint-additional-info-item"> 561 <a href="https://github.com/rust-lang/rust-clippy/blob/{{docVersion}}/clippy_lints/{{lint.id_span.path}}#L{{lint.id_span.line}}">View Source</a> 562 </div> 563 </div> 564 </div> 565 </article> 566 </div> 567 </div> 568 569 <a href="https://github.com/rust-lang/rust-clippy"> 570 <img style="position: absolute; top: 0; right: 0; border: 0; clip-path: polygon(0% 0%, 100% 0%, 100% 100%);" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub"/> 571 </a> 572 573 <script src="https://cdnjs.cloudflare.com/ajax/libs/markdown-it/12.3.2/markdown-it.min.js"></script> 574 <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.6.0/highlight.min.js"></script> 575 <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.6.0/languages/rust.min.js"></script> 576 <script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.12/angular.min.js"></script> 577 <script src="script.js"></script> 578</body> 579</html>