summary refs log tree commit diff
path: root/src/doc/not_found.md
blob: f404aa046c1aecf52bb34b3e4d14d2eae7c9a8ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
% Not Found

<!-- Completely hide the TOC and the section numbers -->
<style type="text/css">
#TOC { display: none; }
.header-section-number { display: none; }
li {list-style-type: none; }
</style>

Looks like you've taken a wrong turn.

Some things that might be helpful to you though:

# Search

<form action="https://duckduckgo.com/">
    <input type="text" id="site-search" name="q" size="80"></input>
    <input type="submit" value="Search DuckDuckGo"></form>

Rust doc search: <span id="core-search"></span>

# Reference

 * [The Rust official site](https://www.rust-lang.org)
 * [The Rust reference](https://doc.rust-lang.org/reference/index.html)

# Docs

[The standard library](https://doc.rust-lang.org/std/)

<script>
function get_url_fragments() {
    var last = document.URL.split("/").pop();
    var tokens = last.split(".");
    var op = [];
    for (var i=0; i < tokens.length; i++) {
        var t = tokens[i];
        if (t == 'html' || t.indexOf("#") != -1) {
            // no html or anchors
        } else {
            op.push(t);
        }
    }
    return op;
}

function populate_site_search() {
    var op = get_url_fragments();

    var search = document.getElementById('site-search');
    search.value = op.join(' ') + " site:doc.rust-lang.org";
}

function populate_rust_search() {
    var op = get_url_fragments();
    var lt = op.pop();

    // #18540, use a single token

    var a = document.createElement("a");
    a.href = "https://doc.rust-lang.org/core/?search=" + encodeURIComponent(lt);
    a.textContent = lt;
    var search = document.getElementById('core-search');
    search.innerHTML = "";
    search.appendChild(a);
}
populate_site_search();
populate_rust_search();
</script>